TYPO3 v15 dev-main snapshot ()
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -0,0 +1,14 @@
|
||||
/*!
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
@font-face{font-display:swap;font-family:Open Sans Variable;font-stretch:75% 100%;font-style:normal;font-weight:300 800;src:url(../Fonts/OpenSans/open-sans-latin-wdth-normal.woff2) format("woff2-variations");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}
|
||||
@font-face{font-display:swap;font-family:Open Sans Variable;font-stretch:75% 100%;font-style:italic;font-weight:300 800;src:url(../Fonts/OpenSans/open-sans-latin-wdth-italic.woff2) format("woff2-variations");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!-- Close script, used in particular by FormEngine to close the current edit window -->
|
||||
<!-- TYPO3 Script ID: typo3/sysext/backend/Resources/Public/Html/Close.html -->
|
||||
<meta charset="utf-8" />
|
||||
<title>Close</title>
|
||||
<script src="../JavaScript/close-current-window.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path fill="#FF8700" d="M0 0h64v64H0z"/><path fill="#FFF" d="M42.8 32.8c-3.6 0-8.1-10.1-8.1-15.1 0-2.3.9-2.7 3.2-2.7 5.5 0 11 .9 11 4-.1 6.2-4 13.8-6.1 13.8zM28.5 18.5c0 5 6.4 20.2 10.7 20.2.5 0 .9-.1 1.4-.2-3.8 6.1-8.4 10.6-11.2 10.6-5.9 0-14.3-17.9-14.3-25.7 0-1.2.3-2.2.7-2.8 2-2.5 8.4-4.4 13.7-5-.6.4-1 1-1 2.9z"/></svg>
|
||||
|
After Width: | Height: | Size: 384 B |
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 191 B |
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Created by Martin Engel -->
|
||||
<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10'>
|
||||
<rect width='10' height='10' fill='#fff' opacity='0.5'/>
|
||||
<path d='M0,10L10,0L0,10z M10.9,9.1l-2,2L10.9,9.1z M-1,1l2-2L-1,1z' stroke='#000' stroke-width='2'/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 302 B |
Binary file not shown.
|
After Width: | Height: | Size: 123 B |
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="83.098" height="84.172" viewBox="43.201 42.122 83.098 84.172">
|
||||
<path fill="#FF8700" d="M106.074 100.128c-1.247.368-2.242.506-3.549.506-10.689 0-26.389-37.359-26.389-49.793 0-4.577 1.083-6.104 2.613-7.415-13.084 1.527-28.784 6.329-33.806 12.433-1.085 1.529-1.743 3.926-1.743 6.98 0 19.41 20.718 63.455 35.332 63.455 6.765.001 18.164-11.112 27.542-26.166M99.25 42.122c13.52 0 27.049 2.18 27.049 9.812 0 15.483-9.819 34.246-14.832 34.246-8.942 0-20.065-24.867-20.065-37.301.001-5.67 2.181-6.757 7.848-6.757"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 563 B |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
import{parser as a}from"@lezer/json";import{LRLanguage as s,indentNodeProp as i,continuedIndent as r,foldNodeProp as c,foldInside as d,LanguageSupport as g}from"@codemirror/language";const m=()=>n=>{try{JSON.parse(n.state.doc.toString())}catch(e){if(!(e instanceof SyntaxError))throw e;const t=p(e,n.state.doc);return[{from:t,message:e.message,severity:"error",to:t}]}return[]};function p(n,e){let t;return(t=n.message.match(/at position (\d+)/))?Math.min(+t[1],e.length):(t=n.message.match(/at line (\d+) column (\d+)/))?Math.min(e.line(+t[1]).from+ +t[2]-1,e.length):0}const o=s.define({name:"json",parser:a.configure({props:[i.add({Object:r({except:/^\s*\}/}),Array:r({except:/^\s*\]/})}),c.add({"Object Array":d})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function u(){return new g(o)}export{u as json,o as jsonLanguage,m as jsonParseLinter};
|
||||
@@ -0,0 +1 @@
|
||||
import{parser as l}from"@lezer/php";import{parseMixed as i}from"@lezer/common";import{html as p}from"@codemirror/lang-html";import{LRLanguage as u,indentNodeProp as d,continuedIndent as r,delimitedIndent as m,foldNodeProp as f,foldInside as c,LanguageSupport as g}from"@codemirror/language";const a=u.define({name:"php",parser:l.configure({props:[d.add({IfStatement:r({except:/^\s*({|else\b|elseif\b|endif\b)/}),TryStatement:r({except:/^\s*({|catch\b|finally\b)/}),SwitchBody:e=>{let o=e.textAfter,t=/^\s*\}/.test(o),n=/^\s*(case|default)\b/.test(o);return e.baseIndent+(t?0:n?1:2)*e.unit},ColonBlock:e=>e.baseIndent+e.unit,"Block EnumBody DeclarationList":m({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"String BlockComment":()=>null,Statement:r({except:/^({|end(for|foreach|switch|while)\b)/})}),f.add({"Block EnumBody DeclarationList SwitchBody ArrayExpression ValueList":c,ColonBlock(e){return{from:e.from+1,to:e.to}},BlockComment(e){return{from:e.from+2,to:e.to-2}}})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"},line:"//"},indentOnInput:/^\s*(?:case |default:|end(?:if|for(?:each)?|switch|while)|else(?:if)?|\{|\})$/,wordChars:"$",closeBrackets:{stringPrefixes:["b","B"]}}});function h(e={}){let o=[],t;if(e.baseLanguage!==null)if(e.baseLanguage)t=e.baseLanguage;else{let n=p({matchClosingTags:!1});o.push(n.support),t=n.language}return new g(a.configure({wrap:t&&i(n=>n.type.isTop?{parser:t.parser,overlay:s=>s.name=="Text"}:null),top:e.plain?"Program":"Template"}),o)}export{h as php,a as phpLanguage};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
import{EditorView as C}from"@codemirror/view";import{HighlightStyle as y,syntaxHighlighting as B}from"@codemirror/language";import{tags as o}from"@lezer/highlight";const d="#e5c07b",c="#e06c75",m="#56b6c2",g="#ffffff",r="#abb2bf",e="#7d8799",s="#61afef",b="#98c379",a="#d19a66",p="#c678dd",f="#21252b",l="#2c313a",n="#282c34",t="#353a42",u="#3E4451",i="#528bff",v={chalky:d,coral:c,cyan:m,invalid:g,ivory:r,stone:e,malibu:s,sage:b,whiskey:a,violet:p,darkBackground:f,highlightBackground:l,background:n,tooltipBackground:t,selection:u,cursor:i},k=C.theme({"&":{color:r,backgroundColor:n},".cm-content":{caretColor:i},".cm-cursor, .cm-dropCursor":{borderLeftColor:i},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:u},".cm-panels":{backgroundColor:f,color:r},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:n,color:e,border:"none"},".cm-activeLineGutter":{backgroundColor:l},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:t},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:t,borderBottomColor:t},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:l,color:r}}},{dark:!0}),h=y.define([{tag:o.keyword,color:p},{tag:[o.name,o.deleted,o.character,o.propertyName,o.macroName],color:c},{tag:[o.function(o.variableName),o.labelName],color:s},{tag:[o.color,o.constant(o.name),o.standard(o.name)],color:a},{tag:[o.definition(o.name),o.separator],color:r},{tag:[o.typeName,o.className,o.number,o.changed,o.annotation,o.modifier,o.self,o.namespace],color:d},{tag:[o.operator,o.operatorKeyword,o.url,o.escape,o.regexp,o.link,o.special(o.string)],color:m},{tag:[o.meta,o.comment],color:e},{tag:o.strong,fontWeight:"bold"},{tag:o.emphasis,fontStyle:"italic"},{tag:o.strikethrough,textDecoration:"line-through"},{tag:o.link,color:e,textDecoration:"underline"},{tag:o.heading,fontWeight:"bold",color:c},{tag:[o.atom,o.bool,o.special(o.variableName)],color:a},{tag:[o.processingInstruction,o.string,o.inserted],color:b},{tag:o.invalid,color:g}]),x=[k,B(h)];export{v as color,x as oneDark,h as oneDarkHighlightStyle,k as oneDarkTheme};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,2 @@
|
||||
import{NodeProp as D}from"@lezer/common";let Q=0;class m{constructor(t,a,i){this.set=t,this.base=a,this.modified=i,this.id=Q++}static define(t){if(t?.base)throw new Error("Can not derive from a modified tag");let a=new m([],null,[]);if(a.set.push(a),t)for(let i of t.set)a.set.push(i);return a}static defineModifier(){let t=new B;return a=>a.modified.indexOf(t)>-1?a:B.get(a.base||a,a.modified.concat(t).sort((i,l)=>i.id-l.id))}}let U=0;class B{constructor(){this.instances=[],this.id=U++}static get(t,a){if(!a.length)return t;let i=a[0].instances.find(r=>r.base==t&&W(a,r.modified));if(i)return i;let l=[],s=new m(l,t,a);for(let r of a)r.instances.push(s);let c=X(a);for(let r of t.set)if(!r.modified.length)for(let d of c)l.push(B.get(r,d));return s}}function W(o,t){return o.length==t.length&&o.every((a,i)=>a==t[i])}function X(o){let t=[[]];for(let a=0;a<o.length;a++)for(let i=0,l=t.length;i<l;i++)t.push(t[i].concat(o[a]));return t.sort((a,i)=>i.length-a.length)}function Y(o){let t=Object.create(null);for(let a in o){let i=o[a];Array.isArray(i)||(i=[i]);for(let l of a.split(" "))if(l){let s=[],c=2,r=l;for(let f=0;;){if(r=="..."&&f>0&&f+3==l.length){c=1;break}let h=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(r);if(!h)throw new RangeError("Invalid path: "+l);if(s.push(h[0]=="*"?"":h[0][0]=='"'?JSON.parse(h[0]):h[0]),f+=h[0].length,f==l.length)break;let p=l[f++];if(f==l.length&&p=="!"){c=0;break}if(p!="/")throw new RangeError("Invalid path: "+l);r=l.slice(f)}let d=s.length-1,g=s[d];if(!g)throw new RangeError("Invalid path: "+l);let b=new A(i,c,d>0?s.slice(0,d):null);t[g]=b.sort(t[g])}}return F.add(t)}const F=new D;class A{constructor(t,a,i,l){this.tags=t,this.mode=a,this.context=i,this.next=l}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(t){return!t||t.depth<this.depth?(this.next=t,this):(t.next=this.sort(t.next),t)}get depth(){return this.context?this.context.length:0}}A.empty=new A([],2,null);function J(o,t){let a=Object.create(null);for(let s of o)if(!Array.isArray(s.tag))a[s.tag.id]=s.class;else for(let c of s.tag)a[c.id]=s.class;let{scope:i,all:l=null}=t||{};return{style:s=>{let c=l;for(let r of s)for(let d of r.set){let g=a[d.id];if(g){c=c?c+" "+g:g;break}}return c},scope:i}}function Z(o,t){let a=null;for(let i of o){let l=i.style(t);l&&(a=a?a+" "+l:l)}return a}function V(o,t,a,i=0,l=o.length){let s=new _(i,Array.isArray(t)?t:[t],a);s.highlightRange(o.cursor(),i,l,"",s.highlighters),s.flush(l)}function $(o,t,a,i,l,s=0,c=o.length){let r=s;function d(g,b){if(!(g<=r)){for(let f=o.slice(r,g),h=0;;){let p=f.indexOf(`
|
||||
`,h),R=p<0?f.length:p;if(R>h&&i(f.slice(h,R),b),p<0)break;l(),h=p+1}r=g}}V(t,a,(g,b,f)=>{d(g,""),d(b,f)},s,c),d(c,"")}class _{constructor(t,a,i){this.at=t,this.highlighters=a,this.span=i,this.class=""}startSpan(t,a){a!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=a)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,a,i,l,s){let{type:c,from:r,to:d}=t;if(r>=i||d<=a)return;c.isTop&&(s=this.highlighters.filter(p=>!p.scope||p.scope(c)));let g=l,b=z(t)||A.empty,f=Z(s,b.tags);if(f&&(g&&(g+=" "),g+=f,b.mode==1&&(l+=(l?" ":"")+f)),this.startSpan(Math.max(a,r),g),b.opaque)return;let h=t.tree&&t.tree.prop(D.mounted);if(h&&h.overlay){let p=t.node.enter(h.overlay[0].from+r,1),R=this.highlighters.filter(v=>!v.scope||v.scope(h.tree.type)),j=t.firstChild();for(let v=0,M=r;;v++){let O=v<h.overlay.length?h.overlay[v]:null,E=O?O.from+r:d,P=Math.max(a,M),T=Math.min(i,E);if(P<T&&j)for(;t.from<T&&(this.highlightRange(t,P,T,l,s),this.startSpan(Math.min(T,t.to),g),!(t.to>=E||!t.nextSibling())););if(!O||E>i)break;M=O.to+r,M>a&&(this.highlightRange(p.cursor(),Math.max(a,O.from+r),Math.min(i,M),"",R),this.startSpan(Math.min(i,M),g))}j&&t.parent()}else if(t.firstChild()){h&&(l="");do if(!(t.to<=a)){if(t.from>=i)break;this.highlightRange(t,a,i,l,s),this.startSpan(Math.min(i,t.to),g)}while(t.nextSibling());t.parent()}}}function z(o){let t=o.type.prop(F);for(;t&&t.context&&!o.matchContext(t.context);)t=t.next;return t||null}const e=m.define,C=e(),N=e(),G=e(N),L=e(N),x=e(),I=e(x),H=e(x),u=e(),w=e(u),k=e(),y=e(),K=e(),S=e(K),q=e(),n={comment:C,lineComment:e(C),blockComment:e(C),docComment:e(C),name:N,variableName:e(N),typeName:G,tagName:e(G),propertyName:L,attributeName:e(L),className:e(N),labelName:e(N),namespace:e(N),macroName:e(N),literal:x,string:I,docString:e(I),character:e(I),attributeValue:e(I),number:H,integer:e(H),float:e(H),bool:e(x),regexp:e(x),escape:e(x),color:e(x),url:e(x),keyword:k,self:e(k),null:e(k),atom:e(k),unit:e(k),modifier:e(k),operatorKeyword:e(k),controlKeyword:e(k),definitionKeyword:e(k),moduleKeyword:e(k),operator:y,derefOperator:e(y),arithmeticOperator:e(y),logicOperator:e(y),bitwiseOperator:e(y),compareOperator:e(y),updateOperator:e(y),definitionOperator:e(y),typeOperator:e(y),controlOperator:e(y),punctuation:K,separator:e(K),bracket:S,angleBracket:e(S),squareBracket:e(S),paren:e(S),brace:e(S),content:u,heading:w,heading1:e(w),heading2:e(w),heading3:e(w),heading4:e(w),heading5:e(w),heading6:e(w),contentSeparator:e(u),list:e(u),quote:e(u),emphasis:e(u),strong:e(u),link:e(u),monospace:e(u),strikethrough:e(u),inserted:e(),deleted:e(),changed:e(),invalid:e(),meta:q,documentMeta:e(q),annotation:e(q),processingInstruction:e(q),definition:m.defineModifier(),constant:m.defineModifier(),function:m.defineModifier(),standard:m.defineModifier(),local:m.defineModifier(),special:m.defineModifier()},tt=J([{tag:n.link,class:"tok-link"},{tag:n.heading,class:"tok-heading"},{tag:n.emphasis,class:"tok-emphasis"},{tag:n.strong,class:"tok-strong"},{tag:n.keyword,class:"tok-keyword"},{tag:n.atom,class:"tok-atom"},{tag:n.bool,class:"tok-bool"},{tag:n.url,class:"tok-url"},{tag:n.labelName,class:"tok-labelName"},{tag:n.inserted,class:"tok-inserted"},{tag:n.deleted,class:"tok-deleted"},{tag:n.literal,class:"tok-literal"},{tag:n.string,class:"tok-string"},{tag:n.number,class:"tok-number"},{tag:[n.regexp,n.escape,n.special(n.string)],class:"tok-string2"},{tag:n.variableName,class:"tok-variableName"},{tag:n.local(n.variableName),class:"tok-variableName tok-local"},{tag:n.definition(n.variableName),class:"tok-variableName tok-definition"},{tag:n.special(n.variableName),class:"tok-variableName2"},{tag:n.definition(n.propertyName),class:"tok-propertyName tok-definition"},{tag:n.typeName,class:"tok-typeName"},{tag:n.namespace,class:"tok-namespace"},{tag:n.className,class:"tok-className"},{tag:n.macroName,class:"tok-macroName"},{tag:n.propertyName,class:"tok-propertyName"},{tag:n.operator,class:"tok-operator"},{tag:n.comment,class:"tok-comment"},{tag:n.meta,class:"tok-meta"},{tag:n.invalid,class:"tok-invalid"},{tag:n.punctuation,class:"tok-punctuation"}]);export{m as Tag,tt as classHighlighter,z as getStyleTags,$ as highlightCode,V as highlightTree,Y as styleTags,J as tagHighlighter,n as tags};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
import{LRParser as P}from"@lezer/lr";import{styleTags as Q,tags as O}from"@lezer/highlight";const e=Q({String:O.string,Number:O.number,"True False":O.bool,PropertyName:O.propertyName,Null:O.null,",":O.separator,"[ ]":O.squareBracket,"{ }":O.brace}),r=P.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"\u26A0 JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[e],skippedNodes:[0],repeatNodeCount:2,tokenData:"(p~RaXY!WYZ!W]^!Wpq!Wrs!]|}$i}!O$n!Q!R$w!R![&V![!]&h!}#O&m#P#Q&r#Y#Z&w#b#c'f#h#i'}#o#p(f#q#r(k~!]Oc~~!`Upq!]qr!]rs!rs#O!]#O#P!w#P~!]~!wOe~~!zXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#g~#jR!Q![#s!c!i#s#T#Z#s~#vR!Q![$P!c!i$P#T#Z$P~$SR!Q![$]!c!i$]#T#Z$]~$`R!Q![!]!c!i!]#T#Z!]~$nOh~~$qQ!Q!R$w!R![&V~$|RT~!O!P%V!g!h%k#X#Y%k~%YP!Q![%]~%bRT~!Q![%]!g!h%k#X#Y%k~%nR{|%w}!O%w!Q![%}~%zP!Q![%}~&SPT~!Q![%}~&[ST~!O!P%V!Q![&V!g!h%k#X#Y%k~&mOg~~&rO]~~&wO[~~&zP#T#U&}~'QP#`#a'T~'WP#g#h'Z~'^P#X#Y'a~'fOR~~'iP#i#j'l~'oP#`#a'r~'uP#`#a'x~'}OS~~(QP#f#g(T~(WP#i#j(Z~(^P#X#Y(a~(fOQ~~(kOW~~(pOV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});export{r as parser};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
function s(){var r=arguments[0];typeof r=="string"&&(r=document.createElement(r));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var o=t[n];typeof o=="string"?r.setAttribute(n,o):o!=null&&(r[n]=o)}e++}for(;e<arguments.length;e++)f(r,arguments[e]);return r}function f(r,e){if(typeof e=="string")r.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)r.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)f(r,e[t]);else throw new RangeError("Unsupported child node: "+e)}export{s as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,202 @@
|
||||
var k=Object.defineProperty;var I=(n,e)=>{for(var t in e)k(n,t,{get:e[t],enumerable:!0})};var g={};I(g,{OptionPure:()=>p,SelectPure:()=>o});function v(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?v=function(t){return typeof t}:v=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(n)}function a(n,e,t){var i=t.value;if(typeof i!="function")throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(v(i)));var r=!1;return{configurable:!0,get:function(){if(r||this===n.prototype||this.hasOwnProperty(e)||typeof i!="function")return i;var d=i.bind(this);return r=!0,Object.defineProperty(this,e,{configurable:!0,get:function(){return d},set:function(C){i=C,delete this[e]}}),r=!1,d},set:function(d){i=d}}}import{LitElement as _,html as $}from"lit";import{ifDefined as P}from"lit-html/directives/if-defined.js";import{customElement as D}from"lit/decorators/custom-element.js";import{property as f}from"lit/decorators/property.js";var b={ENTER:"Enter",TAB:"Tab"};var y=()=>{};var O={label:"",value:"",select:y,unselect:y,disabled:!1,hidden:!1,selected:!1};import{css as E}from"lit";var x=E`
|
||||
.select-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
.select {
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: var(--select-width, 100%);
|
||||
}
|
||||
.label:focus {
|
||||
outline: var(--select-outline, 2px solid #e3e3e3);
|
||||
}
|
||||
.label:after {
|
||||
border-bottom: 1px solid var(--color, #000);
|
||||
border-right: 1px solid var(--color, #000);
|
||||
box-sizing: border-box;
|
||||
content: "";
|
||||
display: block;
|
||||
height: 10px;
|
||||
margin-top: -2px;
|
||||
transform: rotate(45deg);
|
||||
transition: 0.2s ease-in-out;
|
||||
width: 10px;
|
||||
}
|
||||
.label.visible:after {
|
||||
margin-bottom: -4px;
|
||||
margin-top: 0;
|
||||
transform: rotate(225deg);
|
||||
}
|
||||
select {
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
position: relative;
|
||||
opacity: 0;
|
||||
}
|
||||
select[multiple] {
|
||||
z-index: 0;
|
||||
}
|
||||
select,
|
||||
.label {
|
||||
align-items: center;
|
||||
background-color: var(--background-color, #fff);
|
||||
border-radius: var(--border-radius, 4px);
|
||||
border: var(--border-width, 1px) solid var(--border-color, #000);
|
||||
box-sizing: border-box;
|
||||
color: var(--color, #000);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
font-family: var(--font-family, inherit);
|
||||
font-size: var(--font-size, 14px);
|
||||
font-weight: var(--font-weight, 400);
|
||||
min-height: var(--select-height, 44px);
|
||||
justify-content: space-between;
|
||||
padding: var(--padding, 0 10px);
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
}
|
||||
@media only screen and (hover: none) and (pointer: coarse){
|
||||
select {
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
.dropdown {
|
||||
background-color: var(--border-color, #000);
|
||||
border-radius: var(--border-radius, 4px);
|
||||
border: var(--border-width, 1px) solid var(--border-color, #000);
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
gap: var(--border-width, 1px);
|
||||
justify-content: space-between;
|
||||
max-height: calc(var(--select-height, 44px) * var(--dropdown-items, 4) + var(--border-width, 1px) * calc(var(--dropdown-items, 4) - 1));
|
||||
overflow-y: scroll;
|
||||
position: absolute;
|
||||
top: calc(var(--select-height, 44px) + var(--dropdown-gap, 0px));
|
||||
width: calc(100% - var(--border-width, 1px) * 2);
|
||||
z-index: var(--dropdown-z-index, 2);
|
||||
}
|
||||
.dropdown.visible {
|
||||
display: flex;
|
||||
z-index: 100;
|
||||
}
|
||||
.disabled {
|
||||
background-color: var(--disabled-background-color, #bdc3c7);
|
||||
color: var(--disabled-color, #ecf0f1);
|
||||
cursor: default;
|
||||
}
|
||||
.multi-selected {
|
||||
background-color: var(--selected-background-color, #e3e3e3);
|
||||
border-radius: var(--border-radius, 4px);
|
||||
color: var(--selected-color, #000);
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
justify-content: space-between;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
.multi-selected-wrapper {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
width: calc(100% - 30px);
|
||||
}
|
||||
.cross:after {
|
||||
content: '\\00d7';
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
width: 12px;
|
||||
}
|
||||
`;import{css as L}from"lit";var S=L`
|
||||
.option {
|
||||
align-items: center;
|
||||
background-color: var(--background-color, #fff);
|
||||
box-sizing: border-box;
|
||||
color: var(--color, #000);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
font-family: var(--font-family, inherit);
|
||||
font-size: var(--font-size, 14px);
|
||||
font-weight: var(--font-weight, 400);
|
||||
min-height: var(--select-height, 44px);
|
||||
justify-content: flex-start;
|
||||
padding: var(--padding, 0 10px);
|
||||
width: 100%;
|
||||
}
|
||||
.option:not(.disabled):focus, .option:not(.disabled):not(.selected):hover {
|
||||
background-color: var(--hover-background-color, #e3e3e3);
|
||||
color: var(--hover-color, #000);
|
||||
}
|
||||
.selected {
|
||||
background-color: var(--selected-background-color, #e3e3e3);
|
||||
color: var(--selected-color, #000);
|
||||
}
|
||||
.disabled {
|
||||
background-color: var(--disabled-background-color, #e3e3e3);
|
||||
color: var(--disabled-color, #000);
|
||||
cursor: default;
|
||||
}
|
||||
`;var u=function(n,e,t,i){var r=arguments.length,s=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,i);else for(var h=n.length-1;h>=0;h--)(d=n[h])&&(s=(r<3?d(s):r>3?d(e,t,s):d(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},p=class extends _{constructor(){super(...arguments),this.isSelected=!1,this.isDisabled=!1,this.isHidden=!1,this.optionValue="",this.displayedLabel="",this.optionIndex=-1}static get styles(){return S}connectedCallback(){super.connectedCallback(),this.isSelected=this.getAttribute("selected")!==null,this.isDisabled=this.getAttribute("disabled")!==null,this.isHidden=this.getAttribute("hidden")!==null,this.optionValue=this.getAttribute("value")||"",this.assignDisplayedLabel(),this.fireOnReadyCallback()}getOption(){return{label:this.displayedLabel,value:this.optionValue,select:this.select,unselect:this.unselect,selected:this.isSelected,disabled:this.isDisabled,hidden:this.isHidden}}select(){this.isSelected=!0,this.setAttribute("selected","")}unselect(){this.isSelected=!1,this.removeAttribute("selected")}setOnReadyCallback(e,t){this.onReady=e,this.optionIndex=t}setOnSelectCallback(e){this.onSelect=e}render(){let e=["option"];return this.isSelected&&e.push("selected"),this.isDisabled&&e.push("disabled"),$`
|
||||
<div
|
||||
class="${e.join(" ")}"
|
||||
@click=${this.fireOnSelectCallback}
|
||||
@keydown="${this.fireOnSelectIfEnterPressed}"
|
||||
tabindex="${P(this.isDisabled?void 0:"0")}"
|
||||
>
|
||||
<slot hidden @slotchange=${this.assignDisplayedLabel}></slot>
|
||||
${this.displayedLabel}
|
||||
</div>
|
||||
`}assignDisplayedLabel(){if(this.textContent){this.displayedLabel=this.textContent;return}this.getAttribute("label")&&(this.displayedLabel=this.getAttribute("label")||"")}fireOnReadyCallback(){this.onReady&&this.onReady(this.getOption(),this.optionIndex)}fireOnSelectCallback(e){e.stopPropagation(),!(!this.onSelect||this.isDisabled)&&this.onSelect(this.optionValue)}fireOnSelectIfEnterPressed(e){e.key===b.ENTER&&this.fireOnSelectCallback(e)}};u([f()],p.prototype,"isSelected",void 0);u([f()],p.prototype,"isDisabled",void 0);u([f()],p.prototype,"isHidden",void 0);u([f()],p.prototype,"optionValue",void 0);u([f()],p.prototype,"displayedLabel",void 0);u([f()],p.prototype,"optionIndex",void 0);u([a],p.prototype,"getOption",null);u([a],p.prototype,"select",null);u([a],p.prototype,"unselect",null);u([a],p.prototype,"fireOnReadyCallback",null);p=u([D("option-pure")],p);import{LitElement as A,html as m}from"lit";import{ifDefined as w}from"lit-html/directives/if-defined.js";import{customElement as R}from"lit/decorators/custom-element.js";import{property as c}from"lit/decorators/property.js";import{query as z}from"lit/decorators/query.js";var l=function(n,e,t,i){var r=arguments.length,s=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,i);else for(var h=n.length-1;h>=0;h--)(d=n[h])&&(s=(r<3?d(s):r>3?d(e,t,s):d(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},o=class extends A{constructor(){super(...arguments),this.options=[],this.visible=!1,this.selectedOption=O,this._selectedOptions=[],this.disabled=!1,this.isMultipleSelect=!1,this.name="",this._id="",this.formName="",this.value="",this.values=[],this.defaultLabel="",this.totalRenderedChildOptions=-1,this.form=null,this.hiddenInput=null}static get styles(){return x}connectedCallback(){super.connectedCallback(),this.disabled=this.getAttribute("disabled")!==null,this.isMultipleSelect=this.getAttribute("multiple")!==null,this.name=this.getAttribute("name")||"",this._id=this.getAttribute("id")||"",this.formName=this.name||this.id,this.defaultLabel=this.getAttribute("default-label")||""}open(){this.disabled||(this.visible=!0,this.removeEventListeners(),document.body.addEventListener("click",this.close,!0))}close(e){e&&this.contains(e.target)||(this.visible=!1,this.removeEventListeners())}enable(){this.disabled=!1}disable(){this.disabled=!0}get selectedIndex(){var e;return(e=this.nativeSelect)===null||e===void 0?void 0:e.selectedIndex}set selectedIndex(e){!e&&e!==0||this.selectOptionByValue(this.options[e].value)}get selectedOptions(){var e;return(e=this.nativeSelect)===null||e===void 0?void 0:e.selectedOptions}render(){let e=["label"];return this.disabled&&e.push("disabled"),this.visible&&e.push("visible"),m`
|
||||
<div class="select-wrapper">
|
||||
<select
|
||||
@change=${this.handleNativeSelectChange}
|
||||
?disabled=${this.disabled}
|
||||
?multiple=${this.isMultipleSelect}
|
||||
name="${w(this.name||void 0)}"
|
||||
id=${w(this.id||void 0)}
|
||||
size="1"
|
||||
>
|
||||
${this.getNativeOptionsHtml()}
|
||||
</select>
|
||||
<div class="select">
|
||||
<div
|
||||
class="${e.join(" ")}"
|
||||
@click="${this.visible?this.close:this.open}"
|
||||
@keydown="${this.openDropdownIfProperKeyIsPressed}"
|
||||
tabindex="0"
|
||||
>
|
||||
${this.getDisplayedLabel()}
|
||||
</div>
|
||||
<div class="dropdown${this.visible?" visible":""}">
|
||||
<slot @slotchange=${this.initializeSelect}></slot>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`}handleNativeSelectChange(){var e;this.selectedIndex=(e=this.nativeSelect)===null||e===void 0?void 0:e.selectedIndex}getNativeOptionsHtml(){return this.options.map(this.getSingleNativeOptionHtml)}getSingleNativeOptionHtml({value:e,label:t,hidden:i,disabled:r}){return m`
|
||||
<option
|
||||
value=${e}
|
||||
?selected=${this.isOptionSelected(e)}
|
||||
?hidden=${i}
|
||||
?disabled=${r}
|
||||
>
|
||||
${t}
|
||||
</option>
|
||||
`}isOptionSelected(e){let t=this.selectedOption.value===e;return this.isMultipleSelect&&(t=!!this._selectedOptions.find(i=>i.value===e)),t}openDropdownIfProperKeyIsPressed(e){(e.key===b.ENTER||e.key===b.TAB)&&this.open()}getDisplayedLabel(){return this.isMultipleSelect&&this._selectedOptions.length?this.getMultiSelectLabelHtml():this.selectedOption.label||this.defaultLabel}getMultiSelectLabelHtml(){return m`
|
||||
<div class="multi-selected-wrapper">
|
||||
${this._selectedOptions.map(this.getMultiSelectSelectedOptionHtml)}
|
||||
</div>
|
||||
`}getMultiSelectSelectedOptionHtml({label:e,value:t}){return m`
|
||||
<span class="multi-selected">
|
||||
${e}
|
||||
<span
|
||||
class="cross"
|
||||
@click=${i=>this.fireOnSelectCallback(i,t)}
|
||||
>
|
||||
</span>
|
||||
</span>
|
||||
`}fireOnSelectCallback(e,t){e.stopPropagation(),this.selectOptionByValue(t)}initializeSelect(){this.processChildOptions(),this.selectDefaultOptionIfNoneSelected(),this.appendHiddenInputToClosestForm()}processChildOptions(){let e=this.querySelectorAll("option-pure");this.totalRenderedChildOptions=e.length;for(let t=0;t<e.length;t++)this.initializeSingleOption(e[t],t)}selectDefaultOptionIfNoneSelected(){!this.selectedOption.value&&!this.isMultipleSelect&&this.options.length&&this.selectOptionByValue(this.options[0].value)}initializeSingleOption(e,t){e.setOnSelectCallback(this.selectOptionByValue),this.options[t]=e.getOption(),this.options[t].selected&&this.selectOptionByValue(this.options[t].value)}removeEventListeners(){document.body.removeEventListener("click",this.close)}appendHiddenInputToClosestForm(){this.form=this.closest("form"),!(!this.form||this.hiddenInput)&&(this.hiddenInput=document.createElement("input"),this.hiddenInput.setAttribute("type","hidden"),this.hiddenInput.setAttribute("name",this.formName),this.form.appendChild(this.hiddenInput))}unselectAllOptions(){for(let e=0;e<this.options.length;e++)this.options[e].unselect()}selectOptionByValue(e){let t=this.options.find(({value:i})=>i===e);t&&this.setSelectValue(t)}setSelectValue(e){this.isMultipleSelect?this.setMultiSelectValue(e):this.setSingleSelectValue(e),this.updateHiddenInputInForm(),this.dispatchChangeEvent()}dispatchChangeEvent(){this.dispatchEvent(new Event("change"))}setMultiSelectValue(e){let t=this._selectedOptions.indexOf(e);t!==-1?(this.values.splice(t,1),this._selectedOptions.splice(t,1),e.unselect()):(this.values.push(e.value),this._selectedOptions.push(e),e.select()),this.requestUpdate()}setSingleSelectValue(e){this.unselectAllOptions(),this.close(),this.selectedOption=e,this.value=e.value,e.select()}updateHiddenInputInForm(){if(!this.form||!this.hiddenInput)return;this.hiddenInput.value=this.isMultipleSelect?this.values.join(","):this.value;let e=new Event("change",{bubbles:!0});this.hiddenInput.dispatchEvent(e)}};l([c()],o.prototype,"options",void 0);l([c()],o.prototype,"visible",void 0);l([c()],o.prototype,"selectedOption",void 0);l([c()],o.prototype,"_selectedOptions",void 0);l([c()],o.prototype,"disabled",void 0);l([c()],o.prototype,"isMultipleSelect",void 0);l([c()],o.prototype,"name",void 0);l([c()],o.prototype,"_id",void 0);l([c()],o.prototype,"formName",void 0);l([c()],o.prototype,"value",void 0);l([c()],o.prototype,"values",void 0);l([c()],o.prototype,"defaultLabel",void 0);l([c()],o.prototype,"totalRenderedChildOptions",void 0);l([z("select")],o.prototype,"nativeSelect",void 0);l([a],o.prototype,"close",null);l([a],o.prototype,"getSingleNativeOptionHtml",null);l([a],o.prototype,"getMultiSelectLabelHtml",null);l([a],o.prototype,"getMultiSelectSelectedOptionHtml",null);l([a],o.prototype,"initializeSelect",null);l([a],o.prototype,"initializeSingleOption",null);l([a],o.prototype,"removeEventListeners",null);l([a],o.prototype,"appendHiddenInputToClosestForm",null);l([a],o.prototype,"selectOptionByValue",null);o=l([R("select-pure")],o);var xe=g;export{xe as default};
|
||||
@@ -0,0 +1,3 @@
|
||||
const y="\u037C",m=typeof Symbol>"u"?"__"+y:Symbol.for(y),S=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),g=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class C{constructor(e,n){this.rules=[];let{finish:i}=n||{};function s(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}function l(t,h,a,T){let f=[],r=/^@(\w+)\b/.exec(t[0]),c=r&&r[1]=="keyframes";if(r&&h==null)return a.push(t[0]+";");for(let u in h){let o=h[u];if(/&/.test(u))l(u.split(/,\s*/).map(d=>t.map(p=>d.replace(/&/,p))).reduce((d,p)=>d.concat(p)),o,a);else if(o&&typeof o=="object"){if(!r)throw new RangeError("The value of a property ("+u+") should be a primitive value.");l(s(u),o,f,c)}else o!=null&&f.push(u.replace(/_.*/,"").replace(/[A-Z]/g,d=>"-"+d.toLowerCase())+": "+o+";")}(f.length||c)&&a.push((i&&!r&&!T?t.map(i):t).join(", ")+" {"+f.join(" ")+"}")}for(let t in e)l(s(t),e[t],this.rules)}getRules(){return this.rules.join(`
|
||||
`)}static newName(){let e=g[m]||1;return g[m]=e+1,y+e.toString(36)}static mount(e,n,i){let s=e[S],l=i&&i.nonce;s?l&&s.setNonce(l):s=new A(e,l),s.mount(Array.isArray(n)?n:[n])}}let w=new Map;class A{constructor(e,n){let i=e.ownerDocument||e,s=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let l=w.get(i);if(l)return e.adoptedStyleSheets=[l.sheet,...e.adoptedStyleSheets],e[S]=l;this.sheet=new s.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],w.set(i,this)}else{this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);let l=e.head||e;l.insertBefore(this.styleTag,l.firstChild)}this.modules=[],e[S]=this}mount(e){let n=this.sheet,i=0,s=0;for(let l=0;l<e.length;l++){let t=e[l],h=this.modules.indexOf(t);if(h<s&&h>-1&&(this.modules.splice(h,1),s--,h=-1),h==-1){if(this.modules.splice(s++,0,t),n)for(let a=0;a<t.rules.length;a++)n.insertRule(t.rules[a],i++)}else{for(;s<h;)i+=this.modules[s++].rules.length;i+=t.rules.length,s++}}if(!n){let l="";for(let t=0;t<this.modules.length;t++)l+=this.modules[t].getRules()+`
|
||||
`;this.styleTag.textContent=l}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}export{C as StyleModule};
|
||||
@@ -0,0 +1 @@
|
||||
var t={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},a={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'};for(var n=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),y=typeof navigator<"u"&&/Gecko\/\d+/.test(navigator.userAgent),g=typeof navigator<"u"&&/Mac/.test(navigator.platform),d=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),c=g||n&&+n[1]<57,r=0;r<10;r++)t[48+r]=t[96+r]=String(r);for(var r=1;r<=24;r++)t[r+111]="F"+r;for(var r=65;r<=90;r++)t[r]=String.fromCharCode(r+32),a[r]=String.fromCharCode(r);for(var i in t)a.hasOwnProperty(i)||(a[i]=t[i]);function p(o){var f=c&&(o.ctrlKey||o.altKey||o.metaKey)||d&&o.shiftKey&&o.key&&o.key.length==1||o.key=="Unidentified",e=!f&&o.key||(o.shiftKey?a:t)[o.keyCode]||o.key||"Unidentified";return e=="Esc"&&(e="Escape"),e=="Del"&&(e="Delete"),e=="Left"&&(e="ArrowLeft"),e=="Up"&&(e="ArrowUp"),e=="Right"&&(e="ArrowRight"),e=="Down"&&(e="ArrowDown"),e}export{t as base,p as keyName,a as shift};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
class t{constructor(c){this.callback=c}}export{t as AbstractAction};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{AbstractAction as s}from"@typo3/backend/action-button/abstract-action.js";import a from"@typo3/backend/icons.js";class i extends s{async execute(e){return e.dataset.actionLabel=e.innerText,e.classList.add("disabled"),a.getIcon("spinner-circle",a.sizes.small).then(t=>{e.innerHTML=t}),await this.executeCallback(e)}async executeCallback(e){return await Promise.resolve(this.callback()).finally(()=>{e.innerText=e.dataset.actionLabel,e.classList.remove("disabled")})}}export{i as default};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{AbstractAction as e}from"@typo3/backend/action-button/abstract-action.js";class t extends e{execute(){return this.executeCallback()}async executeCallback(){return Promise.resolve(this.callback())}}export{t as default};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import c from"@typo3/backend/info-window.js";import p from"@typo3/core/event/regular-event.js";import o from"@typo3/backend/window-manager.js";import d from"@typo3/backend/module-menu.js";import u from"@typo3/core/document-service.js";import l from"@typo3/backend/utility.js";class i{constructor(){this.delegates={},this.createDelegates(),u.ready().then(()=>this.registerEvents())}static resolveArguments(e){if(e.dataset.dispatchArgs){const t=e.dataset.dispatchArgs.replace(/"/g,'"'),a=JSON.parse(t);return a instanceof Array?l.trimItems(a):null}else if(e.dataset.dispatchArgsList){const t=e.dataset.dispatchArgsList.split(",");return l.trimItems(t)}return null}createDelegates(){this.delegates={"TYPO3.InfoWindow.showItem":c.showItem.bind(null),"TYPO3.WindowManager.localOpen":o.localOpen.bind(o),"TYPO3.ModuleMenu.showModule":d.App.showModule.bind(d.App)}}registerEvents(){new p("click",this.handleClickEvent.bind(this)).delegateTo(document,"[data-dispatch-action]")}handleClickEvent(e,t){e.preventDefault(),this.delegateTo(e,t)}delegateTo(e,t){if(t.hasAttribute("data-dispatch-disabled"))return;const r=t.dataset.dispatchAction;let s=i.resolveArguments(t);s instanceof Array&&(s=s.map(n=>{switch(n){case"{$target}":return t;case"{$event}":return e;default:return n}})),this.delegates[r]&&this.delegates[r].apply(null,s||[])}}var h=new i;export{h as default};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{BroadcastMessage as c}from"@typo3/backend/broadcast-message.js";import d from"@typo3/core/ajax/ajax-request.js";import i from"@typo3/backend/broadcast-service.js";import m from"@typo3/backend/notification.js";import{sudoModeInterceptor as p}from"@typo3/backend/security/sudo-mode-interceptor.js";class a{static call(e){return new d(TYPO3.settings.ajaxUrls.record_process).addMiddleware(p).withQueryArguments(e).get().then(async r=>await r.resolve())}async process(e,r){return a.call(e).then(s=>{if(s.hasErrors&&this.handleErrors(s),r){const o={...r,hasErrors:s.hasErrors},t=new c("datahandler","process",o);i.post(t);const n=new CustomEvent("typo3:datahandler:process",{detail:{payload:o}});document.dispatchEvent(n)}return s})}handleErrors(e){for(const r of e.messages)m.error(r.title,r.message)}}var l=new a;export{l as default};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
class e{constructor(s="",c=0){this.message=s,this.code=c}}export{e as BackendException};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{html as m}from"lit";import{property as k,state as p,customElement as f}from"lit/decorators.js";import s from"~labels/core.bookmarks";import{PseudoButtonLitElement as y}from"@typo3/backend/element/pseudo-button.js";import n,{BookmarkStoreChangedEvent as u}from"@typo3/backend/bookmark/bookmark-store.js";import b from"@typo3/backend/notification.js";import"@typo3/backend/element/icon-element.js";import"@typo3/backend/element/spinner-element.js";var r=function(c,e,o,a){var d=arguments.length,i=d<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,o):a,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(c,e,o,a);else for(var h=c.length-1;h>=0;h--)(l=c[h])&&(i=(d<3?l(i):d>3?l(e,o,i):l(e,o))||i);return d>3&&i&&Object.defineProperty(e,o,i),i};let t=class extends y{constructor(){super(...arguments),this.route="",this.arguments="",this.displayName="",this.hideLabelText=!1,this.isBookmarked=!1,this.isProcessing=!1,this.handleStoreUpdate=async()=>{await this.checkIfBookmarked(),this.updateState()}}get bookmarkKey(){return n.getBookmarkKey(this.route,this.arguments)}connectedCallback(){super.connectedCallback(),document.addEventListener(u,this.handleStoreUpdate),this.setup()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(u,this.handleStoreUpdate)}createRenderRoot(){return this}render(){const e=this.isBookmarked?s.get("action.remove"):s.get("action.create"),o=this.hideLabelText?m`<span class=visually-hidden>${e}</span>`:m`${e}`;if(this.isProcessing)return m`<typo3-backend-spinner size=small></typo3-backend-spinner>${o}`;const a=this.isBookmarked?"actions-bookmark-remove":"actions-bookmark-add";return m`<typo3-backend-icon identifier=${a} size=small></typo3-backend-icon>${o}`}async buttonActivated(){if(!this.isProcessing){this.isProcessing=!0,this.updateState();try{if(this.isBookmarked){const e=await n.getBookmark(this.bookmarkKey);e&&n.requestDelete(e.id)}else{const e=await n.create(this.route,this.arguments,this.displayName);e.success?b.success(s.get("success.created.title"),s.get("success.created.message")):b.error(s.get("error.createFailed.title"),e.error||s.get("error.createFailed.message"))}}finally{this.isProcessing=!1,await this.checkIfBookmarked(),this.updateState()}}}async setup(){await this.checkIfBookmarked(),this.updateState()}async checkIfBookmarked(){this.isBookmarked=await n.isBookmarked(this.bookmarkKey)}updateState(){this.isProcessing?(this.setAttribute("aria-disabled","true"),this.tabIndex=-1):(this.removeAttribute("aria-disabled"),this.tabIndex=0),this.setAttribute("aria-pressed",this.isBookmarked?"true":"false"),this.title=this.isBookmarked?s.get("action.remove"):s.get("action.create")}};r([k({type:String})],t.prototype,"route",void 0),r([k({type:String})],t.prototype,"arguments",void 0),r([k({type:String,attribute:"display-name"})],t.prototype,"displayName",void 0),r([k({type:Boolean,attribute:"hide-label-text"})],t.prototype,"hideLabelText",void 0),r([p()],t.prototype,"isBookmarked",void 0),r([p()],t.prototype,"isProcessing",void 0),t=r([f("typo3-backend-bookmark-button")],t);export{t as BookmarkButtonElement};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{LitElement as b,html as i,nothing as u}from"lit";import{state as h,customElement as f}from"lit/decorators.js";import{repeat as k}from"lit/directives/repeat.js";import c,{BookmarkStoreChangedEvent as g}from"@typo3/backend/bookmark/bookmark-store.js";import"@typo3/backend/element/icon-element.js";import"@typo3/backend/bookmark/bookmark-manager.js";import l from"~labels/core.bookmarks";var m=function(p,e,o,n){var a=arguments.length,t=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(p,e,o,n);else for(var r=p.length-1;r>=0;r--)(s=p[r])&&(t=(a<3?s(t):a>3?s(e,o,t):s(e,o))||t);return a>3&&t&&Object.defineProperty(e,o,t),t};let d=class extends b{constructor(){super(...arguments),this.groupedBookmarks=new Map,this.groups=[],this.handleStoreUpdate=()=>{this.syncFromStore()}}connectedCallback(){super.connectedCallback(),document.addEventListener(g,this.handleStoreUpdate),this.syncFromStore()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(g,this.handleStoreUpdate)}createRenderRoot(){return this}render(){return i`<p class=dropdown-headline>${l.get("title")}</p>${this.renderContent()}<hr class=dropdown-divider aria-hidden=true><typo3-backend-bookmark-manager-button class=dropdown-item><span class=dropdown-item-columns> <span class="dropdown-item-column dropdown-item-column-icon" aria-hidden=true><typo3-backend-icon identifier=actions-cog size=small></typo3-backend-icon> </span> <span class="dropdown-item-column dropdown-item-column-title">${l.get("manage")} </span> </span></typo3-backend-bookmark-manager-button>`}async syncFromStore(){this.groupedBookmarks=await c.getGroupedBookmarks({accessibleOnly:!0}),this.groups=await c.getGroups()}renderContent(){if(this.groupedBookmarks.size===0)return i`<p class=dropdown-item-text>${l.get("description")}</p>`;let e=!0;return i`${k(Array.from(this.groupedBookmarks.entries()),([o])=>o,([o,n])=>{const a=this.renderGroup(o,n,e);return e=!1,a})}`}renderGroup(e,o,n){const t=this.groups.find(r=>r.id===e)?.label,s=t||this.groups.length>1;return i`${n?u:i`<hr class=dropdown-divider aria-hidden=true>`} ${s?i`<p class=dropdown-header id=bookmark-group-${e}>${t||l.get("notGrouped")}</p>`:u}<ul class=dropdown-list data-bookmarkgroup=${e}>${k(o,r=>r.id,r=>this.renderBookmarkItem(r,e))}</ul>`}renderBookmarkItem(e,o){return i`<li class=t3js-topbar-bookmark data-bookmarkid=${e.id} data-bookmarkgroup=${o}><button type=button class=dropdown-item title=${e.title} @click=${()=>this.handleNavigate(e)}><span class=dropdown-item-columns> <span class="dropdown-item-column dropdown-item-column-icon" aria-hidden=true><typo3-backend-icon identifier=${e.iconIdentifier} overlay=${e.iconOverlayIdentifier} size=small></typo3-backend-icon> </span> <span class="dropdown-item-column dropdown-item-column-title">${e.title} </span> </span></button></li>`}handleNavigate(e){c.navigate(e)}};m([h()],d.prototype,"groupedBookmarks",void 0),m([h()],d.prototype,"groups",void 0),d=m([f("typo3-backend-bookmark-menu")],d);export{d as BookmarkMenuElement};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
class n{constructor(e,t,o){if(!e||!t)throw new Error("Properties componentName and eventName have to be defined");this.componentName=e,this.eventName=t,this.payload=o||{}}static fromData(e){const t=Object.assign({},e);return delete t.componentName,delete t.eventName,new n(e.componentName,e.eventName,t)}createCustomEvent(e="typo3"){return new CustomEvent([e,this.componentName,this.eventName].join(":"),{detail:this.payload})}}export{n as BroadcastMessage};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{BroadcastMessage as n}from"@typo3/backend/broadcast-message.js";import{MessageUtility as a}from"@typo3/backend/utility/message-utility.js";class s{constructor(){this.channel=new BroadcastChannel("typo3")}get isListening(){return typeof this.channel.onmessage=="function"}static onMessage(e){if(!a.verifyOrigin(e.origin))throw"Denied message sent by "+e.origin;const t=n.fromData(e.data);document.dispatchEvent(t.createCustomEvent("typo3"))}listen(){this.isListening||(this.channel.onmessage=s.onMessage)}post(e){this.channel.postMessage(e)}}var i=new s;export{i as default};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import s from"@typo3/backend/element-browser.js";import o from"@typo3/core/event/regular-event.js";class r{constructor(){new o("click",(a,t)=>{a.preventDefault();const e=t.closest("span").dataset;s.insertElement(e.table,e.uid,e.title,"",parseInt(t.dataset.close||"0",10)===1)}).delegateTo(document,"[data-close]")}}var l=new r;export{l as default};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import l from"@typo3/backend/notification.js";import o from"@typo3/backend/icons.js";import u from"@typo3/core/event/regular-event.js";import d from"@typo3/core/ajax/ajax-request.js";import i from"~labels/core.cache";var a;(function(g){g.clearCache=".t3js-clear-page-cache",g.icon=".t3js-icon"})(a||(a={}));class c{constructor(){this.registerClickHandler()}static setDisabled(t,e){t.disabled=e,t.classList.toggle("disabled",e)}static sendClearCacheRequest(t){const e=new d(TYPO3.settings.ajaxUrls.clearcache_page).post({id:t});return e.then(async s=>{const r=await s.resolve();r?.success===!1?l.error(r.title??i.get("notification.error.title"),r.message??i.get("notification.error.message")):l.success(r?.title??i.get("notification.success.title"),r?.message??i.get("notification.success.message"))},()=>{l.error(i.get("notification.error.title"),i.get("notification.error.message"))}),e}registerClickHandler(){const t=document.querySelector(`${a.clearCache}:not([disabled])`);t!==null&&new u("click",e=>{e.preventDefault();const s=e.currentTarget,r=parseInt(s.dataset.id,10);c.setDisabled(s,!0),o.getIcon("spinner-circle",o.sizes.small,null,"disabled").then(n=>{s.querySelector(a.icon).outerHTML=n}),c.sendClearCacheRequest(r).finally(()=>{o.getIcon("actions-system-cache-clear",o.sizes.small).then(n=>{s.querySelector(a.icon).outerHTML=n}),c.setDisabled(s,!1)})}).bindTo(t)}}var f=new c;export{f as default};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
self.close(),window.opener.location.reload();
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
class d{constructor(t,n){this.tsRef=t,this.tsTreeNode=n}getType(){const t=this.tsTreeNode.getValue();return this.tsRef.isType(t)?this.tsRef.getType(t):null}getFilteredProposals(t){const n={},r=[],o=this.tsTreeNode.getChildNodes(),u=this.tsTreeNode.getValue();for(const e in o)if(typeof o[e].value<"u"&&o[e].value!==null){const s={};s.word=e,this.tsRef.typeHasProperty(u,o[e].name)?(this.tsRef.cssClass="definedTSREFProperty",s.type=o[e].value):(s.cssClass="userProperty",this.tsRef.isType(o[e].value)?s.type=o[e].value:s.type=""),r.push(s),n[e]=!0}const i=this.tsRef.getPropertiesFromTypeId(this.tsTreeNode.getValue());for(const e in i)if(typeof i[e].value<"u"&&n[e]!==!0){const s={word:e,cssClass:"undefinedTSREFProperty",type:i[e].value};r.push(s)}const l=[];let p="";for(let e=0;e<r.length;e++){if(t.length===0){l.push(r[e]);continue}p=r[e].word.substring(0,t.length),p.toLowerCase()===t.toLowerCase()&&l.push(r[e])}return l}}export{d as CompletionResult};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import i from"@typo3/core/ajax/ajax-request.js";import{TsRef as l}from"@typo3/backend/code-editor/autocomplete/ts-ref.js";import{TsParser as n}from"@typo3/backend/code-editor/autocomplete/ts-parser.js";import{CompletionResult as p}from"@typo3/backend/code-editor/autocomplete/completion-result.js";class a{constructor(e){this.extTsObjTree={},this.parser=null,this.proposals=null,this.compResult=null,this.tsRef=new l,this.parser=new n(this.tsRef,this.extTsObjTree),this.tsRef.loadTsrefAsync(),this.loadExtTemplatesAsync(e)}refreshCodeCompletion(e){const t=this.getFilter(e),s=this.parser.buildTsObjTree(e);this.compResult=new p(this.tsRef,s),this.proposals=this.compResult.getFilteredProposals(t);const r=[];for(let o=0;o<this.proposals.length;o++)r[o]=this.proposals[o].word;return r}loadExtTemplatesAsync(e){if(Number.isNaN(e)||e===0)return null;new i(TYPO3.settings.ajaxUrls.codeeditor_codecompletion_loadtemplates).withQueryArguments({pageId:e}).get().then(async t=>{this.extTsObjTree.c=await t.resolve(),this.resolveExtReferencesRec(this.extTsObjTree.c)})}resolveExtReferencesRec(e){for(const t of Object.keys(e)){let s;if(e[t].v&&e[t].v.startsWith("<")&&!e[t].v.includes(">")){const r=e[t].v.replace(/</,"").trim();r.indexOf(" ")===-1&&(s=this.getExtChildNode(r),s!==null&&(e[t]=s))}!s&&e[t].c&&this.resolveExtReferencesRec(e[t].c)}}getExtChildNode(e){let t=this.extTsObjTree;const s=e.split(".");for(let r=0;r<s.length;r++){const o=s[r];if(typeof t.c>"u"||typeof t.c[o]>"u")return null;t=t.c[o]}return t}getFilter(e){return e.completingAfterDot?"":e.token.string.replace(".","").replace(/\s/g,"")}}export{a as TsCodeCompletion};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
class c{constructor(t,s){this.childNodes={},this.extPath="",this.parent=null,this.name=t,this.childNodes={},this.extPath="",this.value="",this.isExternal=!1,this.tsParser=s}getChildNodes(){const t=this.getExtNode();if(t!==null&&typeof t.c=="object")for(const s of Object.keys(t.c)){const e=new c(s,this.tsParser);e.global=!0,e.value=t.c[s].v?t.c[s].v:"",e.isExternal=!0,this.childNodes[s]=e}return this.childNodes}getValue(){if(this.value)return this.value;const t=this.getExtNode();if(t&&t.v)return t.v;const s=this.getNodeTypeFromTsref();return s||""}getNodeTypeFromTsref(){const t=this.extPath.split("."),s=t.pop(),e=this.parent.getValue();return e&&this.tsParser.tsRef.typeHasProperty(e,s)?this.tsParser.tsRef.getType(e).properties[s].value:""}getExtNode(){let t=this.tsParser.extTsObjTree;if(this.extPath==="")return t;const s=this.extPath.split(".");for(let e=0;e<s.length;e++){const r=s[e];if(typeof t.c>"u"||typeof t.c[r]>"u")return null;t=t.c[r]}return t}}class g extends Array{lastElementEquals(t){return this.length>0&&this[this.length-1]===t}popIfLastElementEquals(t){return this.lastElementEquals(t)?(this.pop(),!0):!1}}class E{constructor(t,s){this.tsRef=t,this.extTsObjTree=s,this.tsTree=new c("_L_",this)}getOperator(t){const s=[":=","=<","<",">","="];for(let e=0;e<s.length;e++){const r=s[e];if(t.indexOf(r)!==-1)return(r==="=<"||r==="<")&&t.indexOf(">")>-1?"=":r}return-1}buildTsObjTree(t){this.tsTree=new c("",this),this.tsTree.value="TLO";let s=1,e="",r=!1,o=!1;const n=new g,l=[];let i;for(;s<=t.currentLineNumber;){e="";const h=t.lineTokens[s-1];for(let f=0;f<=h.length;++f)if(f<h.length&&h[f].string.length>0){const a=h[f].string;a.startsWith("#")?n.push("#"):a==="("?n.push("("):a.startsWith("/*")?n.push("/*"):a==="{"&&this.getOperator(e)===-1&&(n.push("{"),l.push(e.trim()),r=!0),a.search(/^\s*\[.*\]/)!==-1&&e.search(/\S/)===-1&&a.search(/^\s*\[(global|end|GLOBAL|END)\]/)===-1&&!n.lastElementEquals("#")&&!n.lastElementEquals("/*")&&!n.lastElementEquals("{")&&!n.lastElementEquals("(")&&(o=!0,r=!0),e.search(/\S/)===-1&&!n.lastElementEquals("#")&&!n.lastElementEquals("/*")&&!n.lastElementEquals("(")&&(a.search(/^\s*\[(global|end|GLOBAL|END)\]/)!==-1&&!n.lastElementEquals("{")||a.search(/^\s*\[(global|GLOBAL)\]/)!==-1)&&(o=!1,r=!0),a===")"&&n.popIfLastElementEquals("("),a.startsWith("*/")&&(n.popIfLastElementEquals("/*"),r=!0),a==="}"&&e.replace(/\s/g,"")===""&&(n.popIfLastElementEquals("{"),l.length>0&&l.pop(),r=!0),n.lastElementEquals("#")||(e+=a)}else{if(!n.lastElementEquals("/*")&&!n.lastElementEquals("(")&&!r&&!o){e=e.trim();const a=this.getOperator(e);if(a!==-1){const d=e.indexOf(a);i=e.substring(0,d),l.length>0&&(i=l.join(".")+"."+i);let u=e.substring(d+a.length,e.length).trim();switch(i=i.trim(),a){case"=":i.search(/\s/g)===-1&&i.length>0&&this.setTreeNodeValue(i,u);break;case"=<":l.length>0&&u.substr(0,1)==="."&&(u=l.join(".")+u),i.search(/\s/g)===-1&&i.length>0&&u.search(/\s/g)===-1&&u.length>0&&this.setReference(i,u);break;case"<":l.length>0&&u.substr(0,1)==="."&&(u=l.join(".")+u),i.search(/\s/g)===-1&&i.length>0&&u.search(/\s/g)===-1&&u.length>0&&this.setCopy(i,u);break;case">":this.deleteTreeNodeValue(i);break;case":=":break;default:break}}}n.popIfLastElementEquals("#"),r=!1}s++}if(!n.lastElementEquals("/*")&&!n.lastElementEquals("(")&&!r){const h=e.indexOf("<");h!==-1?(i=e.substring(h+1,e.length).trim(),l.length>0&&i.substr(0,1)==="."&&(i=l.join(".")+i)):(i=e,l.length>0&&(i=l.join(".")+"."+i,i=i.replace(/\s/g,"")));const f=i.lastIndexOf(".");i=i.substring(0,f)}return this.getTreeNode(i)}getTreeNode(t){if(t=t.trim(),t.length===0)return this.tsTree;const s=t.split(".");let e=this.tsTree.childNodes,r,o=this.tsTree;for(let n=0;n<s.length;n++){if(r=s[n],typeof e[r]>"u"||typeof e[r].childNodes>"u"){e[r]=new c(r,this),e[r].parent=o;let l=o.extPath;l&&(l+="."),l+=r,e[r].extPath=l}if(n===s.length-1)return e[r];o=e[r],e=e[r].childNodes}}setTreeNodeValue(t,s){const e=this.getTreeNode(t);e.parent!==null&&e.parent.value==="GIFBUILDER"&&s==="TEXT"&&(s="GB_TEXT"),e.parent!==null&&e.parent.value==="GIFBUILDER"&&s==="IMAGE"&&(s="GB_IMAGE"),this.tsRef.isType(s)&&(e.value=s)}deleteTreeNodeValue(t){const s=this.getTreeNode(t);s.value=null,s.childNodes={}}setReference(t,s){const e=t.split("."),r=e[e.length-1],o=this.getTreeNode(t),n=this.getTreeNode(s);o.parent!==null?o.parent.childNodes[r]=n:this.tsTree.childNodes[r]=n}setCopy(t,s){this.clone=l=>{if(typeof l!="object")return l;const i={};for(const h in l)h!=="tsParser"&&(h!=="parent"?typeof l[h]=="object"?i[h]=this.clone(l[h]):i[h]=l[h]:"parent"in l&&(i.parent=l.parent));return i};const e=t.split("."),r=e[e.length-1],o=this.getTreeNode(t),n=this.getTreeNode(s);o.parent!==null?o.parent.childNodes[r]=this.clone(n):this.tsTree.childNodes[r]=this.clone(n)}}export{c as TreeNode,E as TsParser};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import h from"@typo3/core/ajax/ajax-request.js";class d{constructor(e,s,t){this.properties={},this.typeId=e,this.extends=s,this.properties=t}}class o{constructor(e,s,t){this.parentType=e,this.name=s,this.value=t}}class f{constructor(){this.typeTree={},this.doc=null}async loadTsrefAsync(){const e=await new h(TYPO3.settings.ajaxUrls.codeeditor_tsref).get();this.doc=await e.resolve(),this.buildTree()}buildTree(){for(const e of Object.keys(this.doc)){const s=this.doc[e];this.typeTree[e]=new d(e,s.extends||void 0,Object.fromEntries(Object.entries(s.properties).map(([t,r])=>[t,new o(e,t,r.type)])))}for(const e of Object.keys(this.typeTree))typeof this.typeTree[e].extends<"u"&&this.addPropertiesToType(this.typeTree[e],this.typeTree[e].extends,100)}addPropertiesToType(e,s,t){if(t<0)throw"Maximum recursion depth exceeded while trying to resolve the extends in the TSREF!";const r=s.split(",");for(let i=0;i<r.length;i++)if(typeof this.typeTree[r[i]]<"u"){typeof this.typeTree[r[i]].extends<"u"&&this.addPropertiesToType(this.typeTree[r[i]],this.typeTree[r[i]].extends,t-1);const y=this.typeTree[r[i]].properties;for(const p in y)typeof e.properties[p]>"u"&&(e.properties[p]=y[p])}}getPropertiesFromTypeId(e){return typeof this.typeTree[e]<"u"?(this.typeTree[e].properties.clone=function(){const s={};for(const t of Object.keys(this))s[t]=new o(this[t].parentType,this[t].name,this[t].value);return s},this.typeTree[e].properties):{}}typeHasProperty(e,s){return typeof this.typeTree[e]<"u"&&typeof this.typeTree[e].properties[s]<"u"}getType(e){return this.typeTree[e]}isType(e){return typeof this.typeTree[e]<"u"}}export{f as TsRef,o as TsRefProperty,d as TsRefType};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import f from"@typo3/core/document-service.js";import{StreamLanguage as g,LanguageSupport as d,syntaxTree as p}from"@codemirror/language";import{TypoScriptStreamParserFactory as y}from"@typo3/backend/code-editor/stream-parser/typoscript.js";import{TsCodeCompletion as h}from"@typo3/backend/code-editor/autocomplete/ts-code-completion.js";function C(){const e=g.define(new y().create()),t=e.data.of({autocomplete:u});return new d(e,[t])}const D=(async()=>{await f.ready();const e=parseInt(document.querySelector('input[name="effectivePid"]')?.value,10);return new h(e)})();async function u(e){if(!e.explicit)return null;const t=k(e),s=e.pos-(t.completingAfterDot?1:0),n=p(e.state).resolveInner(s,-1),r=n.name==="Document"||t.completingAfterDot?"":e.state.sliceDoc(n.from,s),o=n.name==="Document"||t.completingAfterDot?e.pos:n.from;let i={start:n.from,end:s,string:r,type:n.name};/^[\w$_]*$/.test(r)||(i={start:e.pos,end:e.pos,string:"",type:r==="."?"property":null}),t.token=i;const l=(await D).refreshCodeCompletion(t);if((n.name==="string"||n.name==="comment")&&w(r,l))return null;const m=T(r,l);return{from:o,options:m.map(a=>({label:a,type:"keyword"}))}}function k(e){const t=e.state.sliceDoc().split(e.state.lineBreak).length,s=e.state.sliceDoc(0,e.pos).split(e.state.lineBreak).length,n=e.state.sliceDoc().split(e.state.lineBreak)[s-1],o=e.state.sliceDoc(e.pos-1,e.pos)===".";return{lineTokens:S(t,e),currentLineNumber:s,currentLine:n,lineCount:t,completingAfterDot:o}}function S(e,t){const s=Array(e).fill("").map(()=>[]);let n=0,r=1;return p(t.state).cursor().iterate(o=>{const i=o.type.name||o.name;if(i==="Document")return;const c=o.from,l=o.to;n<c&&t.state.sliceDoc(n,c).split(t.state.lineBreak).forEach(a=>{a&&(s[Math.min(r-1,e-1)].push({type:null,string:a,start:n,end:n+a.length}),r++,n+=a.length)});const m=t.state.sliceDoc(o.from,o.to);r=t.state.sliceDoc(0,o.from).split(t.state.lineBreak).length,s[r-1].push({type:i,string:m,start:c,end:l}),n=l}),n<t.state.doc.length&&s[r-1].push({type:null,string:t.state.sliceDoc(n),start:n,end:t.state.doc.length}),s}function w(e,t){const s=e.length;for(let n=0;n<t.length;++n)if(e===t[n].substr(s))return!0;return!1}function T(e,t){const s=new Set,n=o=>{o.lastIndexOf(e,0)===0&&!s.has(o)&&s.add(o)};for(let o=0,i=t.length;o<i;++o)n(t[o]);const r=Array.from(s);return r.sort(),r}export{u as complete,C as typoscript};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{property as s,query as d,customElement as h}from"lit/decorators.js";import{LitElement as b,css as u,html as g}from"lit";import k from"alwan";import v from"@typo3/core/event/regular-event.js";import y from"@typo3/core/document-service.js";var i=function(n,o,e,r){var a=arguments.length,t=a<3?o:r===null?r=Object.getOwnPropertyDescriptor(o,e):r,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(n,o,e,r);else for(var p=n.length-1;p>=0;p--)(l=n[p])&&(t=(a<3?l(t):a>3?l(o,e,t):l(o,e))||t);return a>3&&t&&Object.defineProperty(o,e,t),t};let c=class extends b{constructor(){super(...arguments),this.color="",this.opacity=!1,this.swatches=[]}static{this.styles=u`:host{display:inline-block;position:relative}.color-picker-preview{--typo3-colorpicker-preview-width:1.25rem;--typo3-colorpicker-preview-height:1.25rem;--typo3-bg-checkerboard-pattern-size:calc(var(--typo3-colorpicker-preview-width)/2);--typo3-bg-checkerboard-background-color:light-dark(var(--token-color-neutral-10),var(--token-color-neutral-85));--typo3-bg-checkerboard-background-image-color:light-dark(var(--token-color-neutral-0),var(--token-color-neutral-90));display:block;position:absolute;width:var(--typo3-colorpicker-preview-width);height:var(--typo3-colorpicker-preview-height);top:50%;inset-inline-start:var(--typo3-input-sm-padding-x);transform:translateY(-50%);background:var(--typo3-bg-checkerboard-background-color);background-image:linear-gradient(45deg,var(--typo3-bg-checkerboard-background-image-color) 25%,transparent 25%),linear-gradient(135deg,var(--typo3-bg-checkerboard-background-image-color) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--typo3-bg-checkerboard-background-image-color) 75%),linear-gradient(135deg,transparent 75%,var(--typo3-bg-checkerboard-background-image-color) 75%);background-position:0 0,calc(var(--typo3-bg-checkerboard-pattern-size)/2) 0,calc(var(--typo3-bg-checkerboard-pattern-size)/2) calc(var(--typo3-bg-checkerboard-pattern-size)/2*-1),0 calc(var(--typo3-bg-checkerboard-pattern-size)/2);background-size:var(--typo3-bg-checkerboard-pattern-size) var(--typo3-bg-checkerboard-pattern-size);background-clip:padding-box;border-radius:var(--typo3-component-border-radius);pointer-events:none}.color-picker-preview-color{position:absolute;inset:0;border-radius:2px;background-color:var(--color,transparent)}`}async firstUpdated(){await y.ready();const o=this.getInputElement();if(!o||(!o.value&&this.color?o.value=this.color:this.color=o.value,o.disabled||o.readOnly))return;const e=new k(o,{position:"bottom-start",format:"hex",opacity:this.opacity,swatches:this.swatches,preset:!1,color:this.color,parent:this.closest("dialog")??""});e.on("open",()=>{o.focus()}),e.on("color",r=>{this.color=r.hex,o.value=this.color,o.dispatchEvent(new Event("blur"))}),["input","change"].forEach(r=>{new v(r,a=>{const t=a.target;this.color=t.value,e.setColor(this.color)}).bindTo(o)})}render(){return g`<slot></slot><span style=--color:${this.color} class=color-picker-preview><span class=color-picker-preview-color></span></span>`}getInputElement(){const o=this.slotEl.assignedNodes();for(const e of o)if(e instanceof HTMLInputElement)return e;return console.warn("No input element found in the slot."),null}};i([s({type:String})],c.prototype,"color",void 0),i([s({type:Boolean})],c.prototype,"opacity",void 0),i([s({type:Array})],c.prototype,"swatches",void 0),i([d("slot")],c.prototype,"slotEl",void 0),c=i([h("typo3-backend-color-picker")],c);class f{initialize(o,e={}){if(o.parentElement instanceof c)return;const r=document.createElement("typo3-backend-color-picker");r.swatches=e.swatches.map(a=>({color:a,label:a})),r.opacity=e.opacity??!1,o.parentNode.insertBefore(r,o),r.appendChild(o)}}var m=new f;export{c as Typo3BackendColorPicker,m as default};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{LitElement as u,html as s,nothing as m}from"lit";import{property as d,state as p,customElement as b}from"lit/decorators.js";import v from"@typo3/core/ajax/ajax-request.js";import"@typo3/backend/element/icon-element.js";var a=function(c,e,t,i){var r=arguments.length,n=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(c,e,t,i);else for(var h=c.length-1;h>=0;h--)(l=c[h])&&(n=(r<3?l(n):r>3?l(e,t,n):l(e,t))||n);return r>3&&n&&Object.defineProperty(e,t,n),n};let o=class extends u{constructor(){super(...arguments),this.activeColorScheme=null,this.colorSchemes=null,this.advancedOptionsExpanded=!1,this.autoDetect=null,this.enabled=null,this.colorSchemeMql=null,this.forcedColorsMql=null,this.colorSchemeMediaQueryListener=e=>this.autoDetect=e.matches?"dark":"light",this.forcedColorsMediaQueryListener=e=>this.enabled=!e.matches}connectedCallback(){super.connectedCallback(),this.colorSchemeMql=window.matchMedia("(prefers-color-scheme: dark)"),this.forcedColorsMql=window.matchMedia("(forced-colors: active)"),this.colorSchemeMediaQueryListener(this.colorSchemeMql),this.forcedColorsMediaQueryListener(this.forcedColorsMql),this.colorSchemeMql.addEventListener("change",this.colorSchemeMediaQueryListener),this.forcedColorsMql.addEventListener("change",this.forcedColorsMediaQueryListener)}disconnectedCallback(){super.disconnectedCallback(),this.colorSchemeMql.removeEventListener("change",this.colorSchemeMediaQueryListener),this.forcedColorsMql.removeEventListener("change",this.forcedColorsMediaQueryListener),this.colorSchemeMql=null,this.forcedColorsMql=null}createRenderRoot(){return this}getRealColorScheme(){return this.activeColorScheme==="auto"?this.autoDetect??"light":this.activeColorScheme??"light"}render(){return s`<div class=btn-group><button type=button class="btn btn-default" title=${this.enabled?this.toggleLabel:this.disabledLabel} ?disabled=${!this.enabled} @click=${e=>this.toggle(e)}><typo3-backend-icon identifier=${this.getIcon(this.activeColorScheme??"auto")} size=small></typo3-backend-icon>${this.getLabel(this.getRealColorScheme())}<typo3-backend-icon identifier=actions-exchange size=small style=margin-left:auto></typo3-backend-icon></button> <button type=button class="btn btn-default ${this.advancedOptionsExpanded?"active":""}" aria-haspopup=true aria-expanded=${this.advancedOptionsExpanded?"true":"false"} ?disabled=${!this.enabled} @click=${e=>{e.stopPropagation(),this.advancedOptionsExpanded=!this.advancedOptionsExpanded}}><span class=visually-hidden>Show more options</span><typo3-backend-icon identifier=${this.advancedOptionsExpanded?"actions-chevron-up":"actions-chevron-down"} size=small></typo3-backend-icon></button></div>${this.advancedOptionsExpanded===!1?m:s`<ul class=dropdown-list>${this.colorSchemes.map(e=>this.renderItem(e))}</ul>`}`}getIcon(e){return this.colorSchemes.find(t=>t.value===e)?.icon??"auto"}getLabel(e){return this.colorSchemes.find(t=>t.value===e)?.label??""}renderItem(e){return s`<li><button class=dropdown-item @click=${t=>this.handleClick(t,e.value)} aria-current=${this.activeColorScheme===e.value?"true":"false"}><span class=dropdown-item-columns> <span class="dropdown-item-column dropdown-item-column-icon" aria-hidden=true><typo3-backend-icon identifier=${e.icon} size=small></typo3-backend-icon> </span> <span class="dropdown-item-column dropdown-item-column-title">${e.label} ${e.value==="auto"?s`<span class=dropdown-item-column-title-info>${this.getLabel(this.autoDetect)}</span>`:""} </span> ${this.activeColorScheme===e.value?s`<span class=text-primary> <typo3-backend-icon identifier=actions-dot size=small></typo3-backend-icon> </span>`:s`<typo3-backend-icon identifier=empty-empty size=small></typo3-backend-icon>`} </span></button></li>`}async toggle(e){e.preventDefault(),e.stopPropagation();let i=this.getRealColorScheme()==="dark"?"light":"dark";i===this.autoDetect&&(i="auto"),this.triggerSchemeUpdate(i),await this.persistSchemeUpdate(i)}async handleClick(e,t){e.preventDefault(),e.stopPropagation(),this.triggerSchemeUpdate(t),await this.persistSchemeUpdate(t),this.advancedOptionsExpanded=!1}async persistSchemeUpdate(e){const t=new URL(TYPO3.settings.ajaxUrls.color_scheme_update,window.location.origin);return await new v(t).post({colorScheme:e})}triggerSchemeUpdate(e){document.dispatchEvent(new CustomEvent("typo3:color-scheme:update",{detail:{colorScheme:e}}))}};a([d({type:String})],o.prototype,"activeColorScheme",void 0),a([d({type:Array})],o.prototype,"colorSchemes",void 0),a([d({type:String})],o.prototype,"toggleLabel",void 0),a([d({type:String})],o.prototype,"disabledLabel",void 0),a([p()],o.prototype,"advancedOptionsExpanded",void 0),a([p()],o.prototype,"autoDetect",void 0),a([p()],o.prototype,"enabled",void 0),o=a([b("typo3-backend-color-scheme-switch")],o);export{o as ColorSchemeSwitchElement};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{property as p,customElement as C}from"lit/decorators.js";import{PseudoButtonLitElement as k}from"@typo3/backend/element/pseudo-button.js";import{SeverityEnum as E}from"@typo3/backend/enum/severity.js";import h from"@typo3/backend/modal.js";import L from"@typo3/core/ajax/ajax-request.js";import S from"@typo3/backend/notification.js";import y from"~labels/core.mod_web_list";var m=function(a,t,n,e){var r=arguments.length,o=r<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,n):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(a,t,n,e);else for(var d=a.length-1;d>=0;d--)(c=a[d])&&(o=(r<3?c(o):r>3?c(t,n,o):c(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o},l,f;(function(a){a.columnsSelector=".t3js-column-selector",a.columnsContainerSelector=".t3js-column-selector-container",a.columnsFilterSelector='input[name="columns-filter"]',a.columnsSelectorActionsSelector=".t3js-column-selector-actions"})(f||(f={}));var g;(function(a){a.toggle="select-toggle",a.all="select-all",a.none="select-none"})(g||(g={}));let u=l=class extends k{constructor(){super(...arguments),this.modalTitle="Show columns",this.buttonOk=y.get("button.ok"),this.buttonClose=y.get("button.close"),this.errorMessage="Could not update columns"}static toggleSelectorActions(t,n,e,r=!1){n.classList.add("disabled");for(let o=0;o<t.length;o++)if(!t[o].disabled&&!t[o].checked&&(r||!l.isColumnHidden(t[o]))){n.classList.remove("disabled");break}e.classList.add("disabled");for(let o=0;o<t.length;o++)if(!t[o].disabled&&t[o].checked&&(r||!l.isColumnHidden(t[o]))){e.classList.remove("disabled");break}}static isColumnHidden(t){return t.closest(f.columnsContainerSelector)?.classList.contains("hidden")}static filterColumns(t,n){n.forEach(e=>{const r=e.closest(f.columnsContainerSelector);if(!e.disabled&&r!==null){const o=r.querySelector(".form-check-label")?.textContent;o&&o.length&&r.classList.toggle("hidden",t.value!==""&&!RegExp(t.value,"i").test(o.trim().replace(/\[\]/g,"").replace(/\s+/g," ")))}})}buttonActivated(){this.showColumnSelectorModal()}showColumnSelectorModal(){if(!this.modalUrl||!this.modalTarget)return;const t=h.advanced({content:this.modalUrl,title:this.modalTitle,severity:E.notice,size:h.sizes.medium,type:h.types.ajax,buttons:[{text:this.buttonClose,active:!0,btnClass:"btn-default",name:"cancel",trigger:(n,e)=>e.hideModal()},{text:this.buttonOk,btnClass:"btn-primary",name:"update",trigger:(n,e)=>this.processSelection(e)}],ajaxCallback:()=>this.handleModalContentLoaded(t)})}processSelection(t){const n=t.querySelector("form");if(n===null){this.abortSelection();return}new L(TYPO3.settings.ajaxUrls.show_columns).post(new FormData(n)).then(async e=>{const r=await e.resolve();r.success===!0?(this.ownerDocument.location.href=this.modalTarget,this.ownerDocument.location.reload()):S.error(r.message||"No update was performed"),h.dismiss()}).catch(()=>{this.abortSelection()})}handleModalContentLoaded(t){const n=t.querySelector("form");if(n===null)return;n.addEventListener("submit",s=>{s.preventDefault()});const e=t.querySelectorAll(f.columnsSelector),r=t.querySelector(f.columnsFilterSelector),o=t.querySelector(f.columnsSelectorActionsSelector),c=o.querySelector('button[data-action="'+g.all+'"]'),d=o.querySelector('button[data-action="'+g.none+'"]');!e.length||r===null||c===null||d===null||(l.toggleSelectorActions(e,c,d,!0),e.forEach(s=>{s.addEventListener("change",()=>{l.toggleSelectorActions(e,c,d)})}),r.addEventListener("keydown",s=>{const b=s.target;s.code==="Escape"&&(s.stopImmediatePropagation(),b.value="")}),r.addEventListener("keyup",s=>{l.filterColumns(s.target,e),l.toggleSelectorActions(e,c,d)}),r.addEventListener("search",s=>{l.filterColumns(s.target,e),l.toggleSelectorActions(e,c,d)}),o.querySelectorAll("button[data-action]").forEach(s=>{s.addEventListener("click",b=>{b.preventDefault();const v=b.currentTarget;if(v.dataset.action){switch(v.dataset.action){case g.toggle:e.forEach(i=>{!i.disabled&&!l.isColumnHidden(i)&&(i.checked=!i.checked)});break;case g.all:e.forEach(i=>{!i.disabled&&!l.isColumnHidden(i)&&(i.checked=!0)});break;case g.none:e.forEach(i=>{!i.disabled&&!l.isColumnHidden(i)&&(i.checked=!1)});break;default:S.warning("Unknown selector action")}l.toggleSelectorActions(e,c,d)}})}))}abortSelection(){S.error(this.errorMessage),h.dismiss()}};m([p({type:String,attribute:"data-url"})],u.prototype,"modalUrl",void 0),m([p({type:String,attribute:"data-target"})],u.prototype,"modalTarget",void 0),m([p({type:String,attribute:"data-title"})],u.prototype,"modalTitle",void 0),m([p({type:String,attribute:"data-button-ok"})],u.prototype,"buttonOk",void 0),m([p({type:String,attribute:"data-button-close"})],u.prototype,"buttonClose",void 0),m([p({type:String,attribute:"data-error-message"})],u.prototype,"errorMessage",void 0),u=l=m([C("typo3-backend-column-selector-button")],u);export{u as ColumnSelectorButton};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import"bootstrap";import i from"@typo3/backend/popover.js";import r from"@typo3/core/event/regular-event.js";import c from"@typo3/core/document-service.js";class n{constructor(){this.trigger="click",this.placement="auto",this.selector=".help-link",this.initialize()}async initialize(){await c.ready();const s=document.querySelectorAll(this.selector);s.forEach(t=>{t.dataset.bsHtml="true",t.dataset.bsPlacement=this.placement,t.dataset.bsTrigger=this.trigger,i.popover(t)}),new r("show.bs.popover",t=>{const e=t.target,o=e.dataset.description;if(o){const a={title:e.dataset.title||"",content:o};i.setOptions(e,a)}}).delegateTo(document,this.selector),new r("click",t=>{const e=t.target;s.forEach(o=>{o.isEqualNode(e)||i.hide(o)})}).delegateTo(document,"body")}}var l=new n;export{l as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import s from"@typo3/backend/form-engine.js";import a from"@typo3/backend/modal.js";import r from"@typo3/backend/severity.js";import l from"@typo3/core/document-service.js";import"@typo3/backend/element/icon-element.js";import i from"~labels/backend.alt_doc";class c{constructor(t={}){this.closeButton=null,this.fullscreenButton=null,this.options=t,l.ready().then(()=>{this.closeButton=document.querySelector(".t3js-contextual-close"),this.fullscreenButton=document.querySelector(".t3js-contextual-fullscreen"),this.initialize()})}initialize(){this.initializeCloseButton(),this.initializeFullscreenButton(),this.initializeEscapeKey(),this.initializeParentMessages(),this.handlePostSaveState(),this.options.justSaved||this.focusFirstElement()}initializeCloseButton(){this.closeButton&&this.closeButton.addEventListener("click",()=>{this.requestClose()})}initializeFullscreenButton(){this.fullscreenButton&&this.fullscreenButton.addEventListener("click",t=>{t.preventDefault();const e=()=>{document.querySelectorAll(".has-change").forEach(o=>o.classList.remove("has-change")),top?.TYPO3?.Backend?.ContentContainer?.setUrl(this.fullscreenButton.href),window.parent.postMessage({actionName:"typo3:editform:navigate"},window.location.origin)};s.hasChange()?a.confirm(i.get("label.confirm.close_without_save.title"),i.get("label.confirm.close_without_save.content"),r.warning,[{text:i.get("buttons.confirm.close_without_save.no"),btnClass:"btn-default",trigger:(o,n)=>{n.hideModal()}},{text:i.get("buttons.confirm.close_without_save.yes"),btnClass:"btn-warning",trigger:(o,n)=>{n.hideModal(),e()}}]):e()})}initializeEscapeKey(){document.addEventListener("keydown",t=>{t.key==="Escape"&&(t.preventDefault(),this.requestClose())})}initializeParentMessages(){window.addEventListener("message",t=>{t.origin===window.location.origin&&t.data?.actionName==="typo3:editform:requestclose"&&this.requestClose()})}handlePostSaveState(){this.options.justSaved&&(window.parent.postMessage({actionName:"typo3:editform:saved",recordTitle:this.options.savedRecordTitle??""},window.location.origin),this.showSavedIndicator()),this.options.closed&&this.notifyParentClose()}requestClose(){s.hasChange()?a.confirm(i.get("label.confirm.close_without_save.title"),i.get("label.confirm.close_without_save.content"),r.warning,[{text:i.get("buttons.confirm.close_without_save.no"),btnClass:"btn-default",trigger:(t,e)=>{e.hideModal()}},{text:i.get("buttons.confirm.close_without_save.yes"),btnClass:"btn-default",trigger:(t,e)=>{e.hideModal(),this.notifyParentClose()}},{text:i.get("buttons.confirm.save_and_close"),btnClass:"btn-primary",active:!0,trigger:(t,e)=>{e.hideModal(),s.saveAndCloseDocument()}}]):this.notifyParentClose()}showSavedIndicator(){const t=document.querySelector(".contextual-record-edit-actions");if(!t)return;const e=document.createElement("span");e.className="contextual-record-edit-saved-indicator",e.innerHTML='<typo3-backend-icon identifier="actions-check" size="small"></typo3-backend-icon> '+i.get("notification.record_saved.title.singular"),t.prepend(e),setTimeout(()=>{e.style.opacity="0",e.addEventListener("transitionend",()=>e.remove())},2e3)}focusFirstElement(){(this.fullscreenButton??this.closeButton)?.focus()}notifyParentClose(){window.parent.postMessage({actionName:"typo3:editform:closed"},window.location.origin)}}export{c as default};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{property as u,customElement as m}from"lit/decorators.js";import{PseudoButtonLitElement as y}from"@typo3/backend/element/pseudo-button.js";import c from"@typo3/backend/notification.js";import p from"~labels/backend.copytoclipboard";var l=function(t,o,e,n){var a=arguments.length,r=a<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,e):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,o,e,n);else for(var d=t.length-1;d>=0;d--)(s=t[d])&&(r=(a<3?s(r):a>3?s(o,e,r):s(o,e))||r);return a>3&&r&&Object.defineProperty(o,e,r),r};function f(t,o=!1){if(!t.length){console.warn("No text for copy to clipboard given."),o||c.error(p.get("copyToClipboard.error"));return}if(navigator.clipboard)navigator.clipboard.writeText(t).then(()=>{document.dispatchEvent(new CustomEvent("copy-to-clipboard-success")),o||c.success(p.get("copyToClipboard.success"),"",1)}).catch(()=>{document.dispatchEvent(new CustomEvent("copy-to-clipboard-error")),o||c.error(p.get("copyToClipboard.error"))});else{const e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.focus(),e.select();try{document.execCommand("copy")?(document.dispatchEvent(new CustomEvent("copy-to-clipboard-success")),o||c.success(p.get("copyToClipboard.success"),"",1)):o||(document.dispatchEvent(new CustomEvent("copy-to-clipboard-error")),c.error(p.get("copyToClipboard.error")))}catch{o||(document.dispatchEvent(new CustomEvent("copy-to-clipboard-error")),c.error(p.get("copyToClipboard.error")))}document.body.removeChild(e)}}let i=class extends y{constructor(){super(...arguments),this.silent=!1}buttonActivated(){if(typeof this.text!="string"){console.warn("No text for copy to clipboard given."),this.silent||(document.dispatchEvent(new CustomEvent("copy-to-clipboard-error")),c.error(p.get("copyToClipboard.error")));return}f(this.text,this.silent)}};l([u({type:String})],i.prototype,"text",void 0),l([u({type:Boolean})],i.prototype,"silent",void 0),i=l([m("typo3-copy-to-clipboard")],i);export{i as CopyToClipboard,f as copyToClipboard};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import m from"flatpickr";import p from"@typo3/backend/storage/persistent.js";import f from"shortcut-buttons-flatpickr";import{DateTime as u}from"luxon";import D from"@typo3/backend/utility/dom-helper.js";import g from"@typo3/core/event/throttle-event.js";import"@typo3/backend/input/clearable.js";import h from"~labels/core.core";const c="ISO8601_LOCALTIME";class b{constructor(){this.format=(typeof opener?.top?.TYPO3<"u"?opener.top:top).TYPO3.settings.DateConfiguration}initialize(n,i=null){if(!(n instanceof HTMLInputElement)||typeof n.dataset.datepickerInitialized<"u")return;let o=document.documentElement.lang;!o||o==="en"?o="default":o==="ch"&&(o="zh"),n.dataset.datepickerInitialized="1",import("flatpickr/dist/l10n").then(()=>{this.initializeField(n,o,i)})}initializeField(n,i,o=null){const r=this.getDateOptions(n);r.locale=i,o&&(r.appendTo=o);const e=p.get("dateTimeFirstDayOfWeek");if(e!=null&&e!==""){const t=parseInt(e,10)-1;m.l10ns[i].firstDayOfWeek=t,m.l10ns.default.firstDayOfWeek=t}if(o instanceof HTMLElement&&o.localName==="typo3-formengine-element-datetime")r.position=()=>{},r.onOpen=[(t,d,l)=>{l.calendarContainer.hasAttribute("popover")||l.calendarContainer.setAttribute("popover","manual"),l.calendarContainer.showPopover()}],r.onClose=(t,d,l)=>{l.calendarContainer.matches(":popover-open")&&l.calendarContainer.hidePopover()};else{const t=this.getScrollEvent();r.onOpen=[()=>{t.bindTo(D.scrollEventTarget(n))}],r.onClose=()=>{t.release()}}const a=m(n,r);a.altInput instanceof HTMLInputElement&&a.input.addEventListener("typo3:internal:clear",()=>{a.clear()}),a._input.addEventListener("change",t=>{const d=t.target.value,l=a.parseDate(d,a.config.altFormat);a.setDate(l,!0)}),a._input.addEventListener("keyup",t=>{t.key==="Escape"&&a.close()})}getScrollEvent(){return new g("scroll",()=>{const n=document.querySelector(".flatpickr-input.active");if(n===null)return;const i=n.getBoundingClientRect(),o=2,r=n._flatpickr.calendarContainer.offsetHeight,s=window.innerHeight-i.bottom<r&&i.top>r;let a,t;s?(a=i.y-r-o,t="arrowBottom"):(a=i.y+i.height+o,t="arrowTop"),n._flatpickr.calendarContainer.style.top=a+"px",n._flatpickr.calendarContainer.classList.remove("arrowBottom","arrowTop"),n._flatpickr.calendarContainer.classList.add(t)},15)}getDateOptions(n){const i=this.format,o=n.dataset.dateType,r=new Date,e={altFormat:"",allowInput:!0,altInput:!0,ariaDateFormat:"DDDD",dateFormat:c,defaultHour:r.getHours(),defaultMinute:r.getMinutes(),enableSeconds:!1,enableTime:!1,formatDate:(s,a)=>{const t=u.fromJSDate(s);return a===c?t.toISO({suppressMilliseconds:!0,includeOffset:!1}):t.toFormat(a)},parseDate:(s,a)=>{if(a===c){const t=u.fromISO(s);if(!t.isValid)throw new Error("Invalid ISO8601 date: "+s);return t.toJSDate()}return u.fromFormat(s,a).toJSDate()},onReady:(s,a,t)=>{if(t.altInput!==void 0){t.altInput.id=t.input.id,t.input.removeAttribute("id"),t.altInput.setAttribute("autocomplete","off"),t.altInput.clearable(),t.input.dataset.formengineInputName!==void 0&&(t.altInput.dataset.formengineDatepickerRealInputName=t.input.dataset.formengineInputName),t.altInput.form.addEventListener("t3-formengine-postfieldvalidation",l=>{l.detail.field===t.input&&t.altInput.classList.toggle("has-error",!l.detail.isValid)});const d=t.altInput.closest(".form-control-clearable-wrapper");d!==null&&d.insertAdjacentElement("afterend",t.input)}},onChange:(s,a,t)=>{t.input.dispatchEvent(new Event("formengine.dp.change"))},maxDate:"",minDate:"",minuteIncrement:1,noCalendar:!1,showMonths:1,monthSelectorType:o.startsWith("date")?"dropdown":"static",weekNumbers:!0,time_24hr:!Intl.DateTimeFormat(navigator.language,{hour:"numeric"}).resolvedOptions().hour12,plugins:[f({theme:"typo3",button:[{label:h.get("labels.datepicker.today")}],onClick:(s,a)=>{a.setDate(new Date,!0)}})]};switch(o){case"datetime":e.altFormat=i.formats.datetime,e.enableTime=!0;break;case"date":e.altFormat=i.formats.date;break;case"time":e.altFormat="HH:mm",e.enableTime=!0,e.noCalendar=!0;break;case"timesec":e.altFormat="HH:mm:ss",e.enableSeconds=!0,e.enableTime=!0,e.noCalendar=!0;break;case"datetimesec":e.altFormat=i.formats.date+" HH:mm:ss",e.enableSeconds=!0,e.enableTime=!0;break;case"year":e.altFormat="yyyy";break;default:}return n.dataset.dateMinDate!==void 0&&(e.minDate=e.parseDate(n.dataset.dateMinDate,c),e.minDate.setSeconds(0)),n.dataset.dateMaxDate!==void 0&&(e.maxDate=e.parseDate(n.dataset.dateMaxDate,c),e.maxDate.setSeconds(59)),e}}var v=new b;export{v as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import p from"@typo3/core/document-service.js";class m{constructor(){this.handleFocusout=e=>{const t=e.currentTarget,r=e.relatedTarget;if(r===null||t.contains(r))return;const o=r.closest(".dropdown-menu[popover]");if(o){const n=o.id;if(n&&t.querySelector(`[popovertarget="${n}"]`))return}t.hidePopover()},this.handleKeydown=e=>{const t=e.currentTarget,r=document.activeElement;if(r&&r.closest(".dropdown-menu")!==t)return;const o=this.getFocusableItems(t);if(o.length===0)return;const n=o.findIndex(s=>s===r),u=this.isRtl(t),i=e.key==="ArrowRight"&&!u||e.key==="ArrowLeft"&&u,l=e.key==="ArrowLeft"&&!u||e.key==="ArrowRight"&&u;switch(e.key){case"ArrowDown":e.preventDefault(),o[(n+1)%o.length].focus();break;case"ArrowUp":e.preventDefault(),o[(n-1+o.length)%o.length].focus();break;case"ArrowRight":case"ArrowLeft":if(i){if(r?.hasAttribute("popovertarget")){e.preventDefault(),e.stopPropagation();const s=r.getAttribute("popovertarget"),a=s?document.getElementById(s):null;if(a?.matches("[popover]")){a.showPopover();const d=this.getFocusableItems(a);d.length>0&&d[0].focus()}}}else if(l){const s=document.querySelector(`[popovertarget="${t.id}"]`);s?.closest(".dropdown-menu")&&(e.preventDefault(),e.stopPropagation(),t.hidePopover(),s.focus())}break;case"Escape":{e.preventDefault(),e.stopPropagation();const s=document.querySelector(`[popovertarget="${t.id}"]`);t.hidePopover(),s?.focus();break}case"Home":e.preventDefault(),o[0].focus();break;case"End":e.preventDefault(),o[o.length-1].focus();break;default:break}},document.addEventListener("toggle",e=>{const t=e.target;t.matches(".dropdown-menu[popover]")&&(e.newState==="open"?(t.addEventListener("keydown",this.handleKeydown),t.addEventListener("focusout",this.handleFocusout)):(t.removeEventListener("keydown",this.handleKeydown),t.removeEventListener("focusout",this.handleFocusout)))},!0),document.addEventListener("keydown",e=>{const t=e.target?.closest(".dropdown-toggle[popovertarget]");if(t&&!t.closest(".dropdown-menu")&&(e.key==="ArrowDown"||e.key==="ArrowUp")){const r=t.getAttribute("popovertarget"),o=r?document.getElementById(r):null;if(!o?.matches("[popover]"))return;e.preventDefault(),o.showPopover();const n=this.getFocusableItems(o);n.length>0&&(e.key==="ArrowDown"?n[0].focus():n[n.length-1].focus())}}),window.addEventListener("blur",()=>{document.querySelectorAll(".dropdown-menu[popover]:popover-open").forEach(e=>{e.hidePopover()})}),document.addEventListener("click",e=>{const r=e.target.closest(".dropdown-item");if(!r||r.hasAttribute("popovertarget"))return;let o=r.closest(".dropdown-menu[popover]");for(;o;)o.hidePopover(),o=o.closest(".dropdown-menu[popover]:popover-open")})}getFocusableItems(e){return Array.from(e.querySelectorAll(".dropdown-item:not(:disabled):not(.disabled)")).filter(t=>t.closest(".dropdown-menu")===e)}isRtl(e){return getComputedStyle(e).direction==="rtl"}}new m;class f{constructor(){this.dropdownIdCounter=0,document.addEventListener("click",e=>{const t=e.target?.closest('[data-bs-toggle="dropdown"]');if(t){e.preventDefault();const r=this.getMenu(t);this.convert(t),r?.togglePopover()}}),p.ready().then(()=>this.convertAll())}convertAnchorToButton(e){const t=document.createElement("button");t.type="button";for(const r of e.attributes)if(r.name==="href"){const o=r.value;o.startsWith("#")&&!e.hasAttribute("data-bs-target")&&t.setAttribute("data-bs-target",o)}else t.setAttribute(r.name,r.value);return t.innerHTML=e.innerHTML,e.replaceWith(t),t}getMenu(e){const t=e.dataset.bsTarget;if(t){const o=t.startsWith("#")?t:"#"+t;return document.querySelector(o)}const r=e.getAttribute("href");return r?.startsWith("#")?document.querySelector(r):e.nextElementSibling?.matches(".dropdown-menu")?e.nextElementSibling:e.closest(".dropdown")?.querySelector(".dropdown-menu")??null}convert(e){if(e.hasAttribute("popovertarget"))return null;const t=this.getMenu(e);return t?(t.id||(t.id="dropdown-menu-"+this.dropdownIdCounter++),t.setAttribute("popover",""),e.tagName==="A"&&(e=this.convertAnchorToButton(e)),e.closest(".dropdown")||e.parentElement?.classList.add("dropdown"),e.setAttribute("popovertarget",t.id),e.removeAttribute("data-bs-toggle"),e.removeAttribute("data-bs-target"),e.removeAttribute("data-bs-offset"),e.removeAttribute("data-bs-auto-close"),e.removeAttribute("data-bs-reference"),e.removeAttribute("data-bs-display"),e.removeAttribute("data-bs-boundary"),e.removeAttribute("aria-haspopup"),e.removeAttribute("aria-expanded"),e):null}convertAll(){document.querySelectorAll('[data-bs-toggle="dropdown"]').forEach(e=>this.convert(e))}}new f;
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{MessageUtility as o}from"@typo3/backend/utility/message-utility.js";import a from"@typo3/core/document-service.js";import d from"@typo3/backend/modal.js";class f{constructor(){this.opener=null,this.fieldReference="",this.irre={objectId:""},this.focusOpenerAndClose=()=>{this.getParent()&&this.getParent().focus(),d.dismiss(),close()},a.ready().then(()=>{const e=document.body.dataset;this.fieldReference=e.fieldReference,this.irre.objectId=e.irreObjectId})}getParent(){const e=typeof window.frames<"u"&&typeof window.frames.frameElement<"u"&&window.frames.frameElement.classList.contains("t3js-modal-iframe"),t=Array.from(top.frames||[]).filter(n=>{try{return typeof n.frameElement<"u"&&n.frameElement.classList.contains("t3js-modal-iframe")&&n.frameElement!==window.frames.frameElement}catch{return!1}});if(this.opener===null&&(e&&t.length>0?this.opener=t.pop():typeof window.parent<"u"&&typeof window.parent.document.list_frame<"u"&&window.parent.document.list_frame.parent.document.querySelector(".t3js-modal-iframe")!==null?this.opener=window.parent.document.list_frame:typeof window.parent<"u"&&typeof window.parent.frames.list_frame<"u"&&window.parent.frames.list_frame.parent.document.querySelector(".t3js-modal-iframe")!==null?this.opener=window.parent.frames.list_frame:typeof window.frames<"u"&&typeof window.frames.frameElement<"u"&&window.frames.frameElement!==null&&window.frames.frameElement.classList.contains("t3js-modal-iframe")?this.opener=window.frames.frameElement.contentWindow.parent:window.opener&&(this.opener=window.opener),this.opener&&!this.windowHasEditForm(this.opener))){const n=this.findEditFormWindow();n&&(this.opener=n)}return this.opener}insertElement(e,t,n,r,i){if(this.irre.objectId){if(this.getParent()){const s={actionName:"typo3:foreignRelation:insert",objectGroup:this.irre.objectId,table:e,uid:t};o.send(s,this.getParent())}else alert("Error - reference to main window is not set properly!"),this.focusOpenerAndClose();return i&&setTimeout(()=>this.focusOpenerAndClose(),0),!0}return this.fieldReference&&this.addElement(n,r||e+"_"+t,i),!1}windowHasEditForm(e){return e?.document?.querySelector('form[name="editform"]')!==null}findEditFormWindow(){try{for(let e=0;e<top.frames.length;e++)try{const t=top.frames[e];if(t!==window&&this.windowHasEditForm(t))return t}catch{}}catch{}return null}addElement(e,t,n){const r={actionName:"typo3:elementBrowser:elementAdded",fieldName:this.fieldReference,value:t,label:e,close:n};if(document.body.dataset.useEvents==="true"){this.dispatch(r);return}this.getParent()?(o.send(r,this.getParent()),n&&setTimeout(()=>this.focusOpenerAndClose(),0)):(alert("Error - reference to main window is not set properly!"),this.focusOpenerAndClose())}dispatch(e){window.frameElement.dispatchEvent(new CustomEvent("typo3:element-browser:message",{bubbles:!0,detail:e}))}}var m=new f;export{m as default};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{property as r,customElement as b}from"lit/decorators.js";import{LitElement as v,html as p,nothing as h}from"lit";import{classMap as y}from"lit/directives/class-map.js";import{SeverityEnum as n}from"@typo3/backend/enum/severity.js";import g from"@typo3/backend/severity.js";import"@typo3/backend/element/icon-element.js";import u from"~labels/core.mod_web_list";var s=function(a,t,o,l){var c=arguments.length,i=c<3?t:l===null?l=Object.getOwnPropertyDescriptor(t,o):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,t,o,l);else for(var m=a.length-1;m>=0;m--)(d=a[m])&&(i=(c<3?d(i):c>3?d(t,o,i):d(t,o))||i);return c>3&&i&&Object.defineProperty(t,o,i),i},f;let e=f=class extends v{constructor(){super(...arguments),this.severity=n.info,this.dismissible=!1,this.visible=!0,this.heading=null,this.message=null,this.showIcon=!1,this.randomSuffix=Math.random().toString(36).substring(7)}static getIconIdentifier(t){return{[n.notice]:"actions-lightbulb",[n.ok]:"actions-check",[n.warning]:"actions-exclamation",[n.error]:"actions-close",[n.info]:"actions-info"}[t]||"actions-info"}createRenderRoot(){return this}render(){return p`<div id=alert-${this.randomSuffix} class=${y(this.getClasses())} role=alert aria-labelledby=alert-title-${this.randomSuffix} aria-describedby=alert-message-${this.randomSuffix} @closed.bs.alert=${this.remove}><div class=alert-inner>${this.showIcon?p`<div class=alert-icon><span class=icon-emphasized> <typo3-backend-icon identifier=${f.getIconIdentifier(this.severity)} size=small></typo3-backend-icon> </span></div>`:h}<div class=alert-content>${this.heading?p`<h4 class=alert-title id=alert-title-${this.randomSuffix}>${this.heading}</h4>`:h}<p class=alert-body id=alert-message-${this.randomSuffix}>${this.message}</p></div></div>${this.dismissible?this.renderDismissButton():h}</div>`}getClasses(){return{alert:!0,["alert-"+g.getCssClass(this.severity)]:!0,"alert-dismissible":this.dismissible,fade:!0,show:this.visible,hidden:!this.visible}}renderDismissButton(){return p`<button type=button class=close data-bs-dismiss=alert aria-label=${u.get("button.close")}><span aria-hidden=true><typo3-backend-icon identifier=actions-close size=small></typo3-backend-icon></span> <span class=visually-hidden>${u.get("button.close")}</span></button>`}};s([r({type:Number})],e.prototype,"severity",void 0),s([r({type:Boolean})],e.prototype,"dismissible",void 0),s([r({type:Boolean})],e.prototype,"visible",void 0),s([r({type:String})],e.prototype,"heading",void 0),s([r({type:String})],e.prototype,"message",void 0),s([r({type:Boolean,attribute:"show-icon"})],e.prototype,"showIcon",void 0),e=f=s([b("typo3-backend-alert")],e);export{e as AlertElement};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{property as l,customElement as m}from"lit/decorators.js";import{PseudoButtonLitElement as u}from"@typo3/backend/element/pseudo-button.js";import g,{Positions as y,Sizes as h,Types as v}from"@typo3/backend/modal.js";import E from"@typo3/backend/notification.js";import p from"@typo3/backend/storage/persistent.js";import f from"~labels/backend.alt_doc";var c=function(s,e,i,n){var r=arguments.length,t=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(s,e,i,n);else for(var o=s.length-1;o>=0;o--)(a=s[o])&&(t=(r<3?a(t):r>3?a(e,i,t):a(e,i))||t);return r>3&&t&&Object.defineProperty(e,i,t),t};let d=class extends u{async buttonActivated(){if(p.isset("contextualRecordEdit")&&p.get("contextualRecordEdit")==0){top?.TYPO3?.Backend?.ContentContainer&&top.TYPO3.Backend.ContentContainer.setUrl(this.editUrl);return}const e=g.advanced({type:v.iframe,title:"",content:this.url,size:h.expand,position:y.sheet,hideHeader:!0});this.setupMessageHandling(e)}setupMessageHandling(e){const i=top;let n="",r=!1,t=!1;const a=o=>{o.origin===window.location.origin&&(o.data?.actionName==="typo3:editform:saved"&&(r=!0,n=o.data.recordTitle??""),o.data?.actionName==="typo3:editform:closed"&&(t=!0,e.hideModal()),o.data?.actionName==="typo3:editform:navigate"&&(t=!0,e.hideModal()))};i.addEventListener("message",a),e.addEventListener("typo3-modal-hide",o=>{if(t)return;o.preventDefault(),e.querySelector("iframe")?.contentWindow?.postMessage({actionName:"typo3:editform:requestclose"},window.location.origin)}),e.addEventListener("typo3-modal-hidden",()=>{i.removeEventListener("message",a),r?(top.document.dispatchEvent(new CustomEvent("typo3:pagetree:refresh")),top.TYPO3?.Backend?.ContentContainer&&top.TYPO3.Backend.ContentContainer.refresh(),E.success(f.get("notification.record_updated.title"),n!==""?f.get("notification.record_updated.message",[n]):void 0)):this.focus()})}};c([l({type:String})],d.prototype,"url",void 0),c([l({type:String,attribute:"edit-url"})],d.prototype,"editUrl",void 0),d=c([m("typo3-backend-contextual-record-edit-trigger")],d);export{d as ContextualRecordEditTriggerElement};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{LitElement as h,html as p,nothing as f}from"lit";import{property as c,state as T,customElement as D}from"lit/decorators.js";import{DateTime as u}from"luxon";var m=function(n,t,e,i){var o=arguments.length,a=o<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(n,t,e,i);else for(var l=n.length-1;l>=0;l--)(r=n[l])&&(a=(o<3?r(a):o>3?r(t,e,a):r(t,e))||a);return o>3&&a&&Object.defineProperty(t,e,a),a},d;(function(n){n.Relative="relative",n.Absolute="absolute"})(d||(d={}));let s=class extends h{constructor(){super(...arguments),this.datetime="",this.mode=d.Absolute,this.format="date",this.thresholdDays=0,this.relativeShowSeconds=!1,this.displayTime="",this.updateTimeoutId=null}disconnectedCallback(){super.disconnectedCallback(),this.clearUpdateTimeout()}willUpdate(t){(t.has("datetime")||t.has("mode")||t.has("format")||t.has("relativeShowSeconds"))&&(this.updateDisplayTime(),this.clearUpdateTimeout(),this.startUpdateTimeout())}createRenderRoot(){return this}render(){const t=this.parseDateTime(this.datetime),e=t?.toISO()||this.datetime,i=t&&this.mode===d.Relative?this.formatAbsoluteDateTime(this.getLocalizedDateTime(t)):"",o=i?`${this.displayTime||this.datetime}. ${i}`:null;return p`<time datetime=${e} title=${i||f} aria-label=${o||f}>${this.displayTime||this.datetime}</time>`}clearUpdateTimeout(){this.updateTimeoutId!==null&&(window.clearTimeout(this.updateTimeoutId),this.updateTimeoutId=null)}startUpdateTimeout(){if(this.mode===d.Relative){const t=this.parseDateTime(this.datetime),e=t?this.calculateNextStateChange(t):null,i=e?Math.abs(e.diffNow("milliseconds").milliseconds):1e3;this.updateTimeoutId=window.setTimeout(()=>{this.updateTimeoutId=null,this.updateDisplayTime(),this.startUpdateTimeout()},i)}}calculateNextStateChange(t){const e=["years","months","days","hours","minutes","seconds"],i=t.diffNow(e);for(const o of e){const a=i.get(o);if(a!==0){const r=a<0?-1:1;return t.minus({[o]:a+r})}}return t.plus({seconds:1})}updateDisplayTime(){const t=this.parseDateTime(this.datetime);t?this.displayTime=this.mode===d.Absolute?this.formatAbsoluteTime(t):this.formatRelativeTime(t):this.displayTime=this.datetime}formatAbsoluteTime(t){const e=this.getLocalizedDateTime(t),i=this.getConfiguredDateFormats();return this.format==="date"&&i?e.toFormat(i.formats.date):this.format==="datetime"&&i?e.toFormat(i.formats.datetime):this.format?e.toFormat(this.format):i?e.toFormat(i.formats.date):e.toLocaleString(u.DATE_SHORT)}parseDateTime(t){if(!t)return null;const i=this.getConfiguredDateFormats()?.timezone,o=Number(t);if(!isNaN(o)&&o>0){const r=i?{zone:i}:{},l=u.fromSeconds(o,r);if(l.isValid)return l}const a=u.fromISO(t);return a.isValid?a:null}getLocalizedDateTime(t){let e=document.documentElement.lang||"en";e==="ch"&&(e="zh");const o=this.getConfiguredDateFormats()?.timezone;let a=t.setLocale(e);return o&&(a=a.setZone(o)),a}formatRelativeTime(t){const e=this.getLocalizedDateTime(t);if(this.thresholdDays>0&&Math.abs(u.now().diff(e,"days").days)>this.thresholdDays)return this.formatAbsoluteDate(e);if(!this.relativeShowSeconds){const o=e.diffNow("seconds").seconds;if(Math.abs(o)<60)return e.toRelative({unit:"minutes",rounding:"expand"})||this.formatAbsoluteDateTime(e)}return e.toRelative()||this.formatAbsoluteDateTime(e)}formatAbsoluteDate(t){const e=this.getLocalizedDateTime(t),i=this.getConfiguredDateFormats();return i?e.toFormat(i.formats.date):e.toLocaleString(u.DATE_SHORT)}formatAbsoluteDateTime(t){const e=this.getLocalizedDateTime(t),i=this.getConfiguredDateFormats();return i?e.toFormat(i.formats.datetime):e.toLocaleString(u.DATETIME_SHORT)}getConfiguredDateFormats(){try{return(typeof opener?.top?.TYPO3<"u"?opener.top:top).TYPO3.settings.DateConfiguration}catch{return null}}};m([c({type:String})],s.prototype,"datetime",void 0),m([c()],s.prototype,"mode",void 0),m([c()],s.prototype,"format",void 0),m([c({type:Number,attribute:"threshold-days"})],s.prototype,"thresholdDays",void 0),m([c({type:Boolean,attribute:"relative-show-seconds"})],s.prototype,"relativeShowSeconds",void 0),m([T()],s.prototype,"displayTime",void 0),s=m([D("typo3-backend-datetime")],s);export{d as DateTimeDisplayMode,s as DateTimeElement};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{property as s,customElement as m}from"lit/decorators.js";import{PseudoButtonLitElement as a}from"@typo3/backend/element/pseudo-button.js";import u from"@typo3/backend/modal.js";import{SeverityEnum as d}from"@typo3/backend/enum/severity.js";var f=function(i,e,o,n){var p=arguments.length,t=p<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,o,n);else for(var c=i.length-1;c>=0;c--)(l=i[c])&&(t=(p<3?l(t):p>3?l(e,o,t):l(e,o))||t);return p>3&&t&&Object.defineProperty(e,o,t),t};let r=class extends a{buttonActivated(){this.url&&u.advanced({content:this.url,title:this.subject,severity:d.notice,size:u.sizes.large,type:u.types.iframe})}};f([s({type:String})],r.prototype,"url",void 0),f([s({type:String})],r.prototype,"subject",void 0),r=f([m("typo3-backend-dispatch-modal-button")],r);export{r as DispatchModalButton};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{LitElement as u,html as f}from"lit";import{property as c,state as p,customElement as z}from"lit/decorators.js";import{Offset as v}from"@typo3/backend/offset.js";var l=function(n,e,t,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,r);else for(var d=n.length-1;d>=0;d--)(a=n[d])&&(i=(o<3?a(i):o>3?a(e,t,i):a(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i},s;(function(n){n.move="move",n.resizeN="resizeN",n.resizeE="resizeE",n.resizeS="resizeS",n.resizeW="resizeW",n.resizeSE="resizeSE",n.resizeSW="resizeSW",n.resizeNE="resizeNE",n.resizeNW="resizeNW"})(s||(s={}));const g=[s.resizeNW,s.resizeN,s.resizeNE],m=[s.resizeNE,s.resizeE,s.resizeSE],b=[s.resizeSE,s.resizeS,s.resizeSW],E=[s.resizeSW,s.resizeW,s.resizeNW];let h=class extends u{constructor(){super(...arguments),this.reverting=!1,this.action=null,this.originOffset=null,this.originPosition=null,this.handleStart=e=>{const t=e.target;if(!(e.buttons!==1||!this.contains(t))){if(t.dataset.resize){const r="resize"+t.dataset.resize.toUpperCase();this.action=s[r]}else this.action=s.move;this.reverting=!1,this.originOffset=this.offset.clone(),this.originPosition={x:e.clientX,y:e.clientY},this.dispatchEvent(this.createEvent("draggable-resizable-started",{action:this.action,originOffset:this.originOffset}))}},this.handleUpdate=e=>{if(!this.action)return;const t={x:e.clientX-this.originPosition.x,y:e.clientY-this.originPosition.y};this.offset=this.adjustOffset(this.originOffset,t),this.dispatchEvent(this.createEvent("draggable-resizable-updated",{action:this.action,originOffset:this.originOffset}))},this.handleFinish=()=>{this.action&&(this.dispatchEvent(this.createEvent("draggable-resizable-finished",{action:this.action,originOffset:this.originOffset})),this.action=null,this.originOffset=null,this.originPosition=null)}}revert(e){this.reverting=!0,this.offset=e,setTimeout(()=>this.reverting=!1,500)}connectedCallback(){super.connectedCallback(),this.pointerEventNames.pointerDown.forEach(e=>document.addEventListener(e,this.handleStart,!0)),this.pointerEventNames.pointerMove.forEach(e=>document.addEventListener(e,this.handleUpdate,!0)),this.pointerEventNames.pointerUp.forEach(e=>document.addEventListener(e,this.handleFinish,!0))}disconnectedCallback(){super.disconnectedCallback(),this.pointerEventNames.pointerDown.forEach(e=>document.removeEventListener(e,this.handleStart,!0)),this.pointerEventNames.pointerMove.forEach(e=>document.removeEventListener(e,this.handleUpdate,!0)),this.pointerEventNames.pointerUp.forEach(e=>document.removeEventListener(e,this.handleFinish,!0))}render(){return f`<div class="cropper-focus-area ui-draggable ui-draggable-handle ui-resizable"><div class="ui-resizable-handle ui-resizable-n" data-resize=n></div><div class="ui-resizable-handle ui-resizable-e" data-resize=e></div><div class="ui-resizable-handle ui-resizable-s" data-resize=s></div><div class="ui-resizable-handle ui-resizable-w" data-resize=w></div><div class="ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se" data-resize=se></div><div class="ui-resizable-handle ui-resizable-sw" data-resize=sw></div><div class="ui-resizable-handle ui-resizable-ne" data-resize=ne></div><div class="ui-resizable-handle ui-resizable-nw" data-resize=nw></div></div>`}update(e){super.update(e),Object.assign(this.style,this.getOffsetStyles(this.offset))}createRenderRoot(){return this}adjustOffset(e,t){const o=this.parentElement.getBoundingClientRect(),i=e.clone();if(this.action===s.move&&(i.left=this.minMax(i.left+t.x,0,o.width-i.width),i.top=this.minMax(i.top+t.y,0,o.height-i.height)),g.includes(this.action)){const a=this.minMax(t.y,-i.top,i.height-2);i.top+=a,i.height-=a}else b.includes(this.action)&&(i.height=this.minMax(i.height+t.y,2,o.height-i.top));if(E.includes(this.action)){const a=this.minMax(t.x,-i.left,i.width-2);i.left+=a,i.width-=a}else m.includes(this.action)&&(i.width+=t.x);return i}minMax(e,t,r){return e<t?t:e>r?r:e}createEvent(e,t){return new CustomEvent(e,{detail:t,bubbles:!0,composed:!0})}getOffsetStyles(e){return{left:`${e.left}px`,top:`${e.top}px`,width:`${e.width}px`,height:`${e.height}px`}}};l([c({type:Object,converter:n=>v.fromObject(JSON.parse(n)),reflect:!0})],h.prototype,"offset",void 0),l([c({type:Object})],h.prototype,"pointerEventNames",void 0),l([c({type:Boolean,reflect:!0})],h.prototype,"reverting",void 0),l([p()],h.prototype,"action",void 0),h=l([z("typo3-backend-draggable-resizable")],h);export{h as DraggableResizableElement};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{LitElement as d,html as c,nothing as m}from"lit";import{Task as u}from"@lit/task";import{property as a,customElement as y}from"lit/decorators.js";import{unsafeHTML as h}from"lit/directives/unsafe-html.js";import{Sizes as v,States as g,MarkupIdentifiers as z}from"@typo3/backend/enum/icon-types.js";import w,{IconStyles as S}from"@typo3/backend/icons.js";import"@typo3/backend/element/spinner-element.js";var n=function(l,t,r,o){var s=arguments.length,e=s<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,r):o,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(l,t,r,o);else for(var f=l.length-1;f>=0;f--)(p=l[f])&&(e=(s<3?p(e):s>3?p(t,r,e):p(t,r))||e);return s>3&&e&&Object.defineProperty(t,r,e),e};let i=class extends d{constructor(){super(...arguments),this.size=v.default,this.state=g.default,this.overlay=null,this.markup=z.inline,this.raw=null,this.iconTask=new u(this,{task:async([t,r,o,s,e],{signal:p})=>await w.getIcon(t,r,o,s,e,p),args:()=>[this.identifier,this.size,this.overlay,this.state,this.markup]})}static{this.styles=S.getStyles()}render(){return this.raw?c`${h(this.raw)}`:this.identifier?this.iconTask.render({pending:()=>c`<typo3-backend-spinner size=${this.size}></typo3-backend-spinner>`,complete:t=>c`${h(t)}`,error:()=>c`<span class="t3js-icon icon icon-size-${this.size} icon-state-${this.state} icon-default-not-found" data-identifier=default-not-found aria-hidden=true> <span class=icon-markup><svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 16 16"><g><path fill="#CD201F" d="m11 12 3-2v6H2v-6l3 2 3-2z"/><path fill="#212121" d="m8 10.3 2.86 1.91.14.09.14-.09 2.61-1.74v5.28H2.25v-5.28l2.61 1.74.14.09.14-.09zm6-.3-3 2-3-2-3 2-3-2v6h12z" opacity=".2"/><path fill="#CD201F" d="M14 4v4l-3 2-3-2-3 2-3-2V0h8z"/><path fill="#212121" d="M13.75 7.87 11 9.7 8.14 7.79 8 7.7l-.14.09L5 9.7 2.25 7.87V.25H10V0H2v8l3 2 3-2 3 2 3-2V4h-.25z" opacity=".2"/><path fill="#FFF" d="M14 4h-4V0z" opacity=".3"/><path fill="#212121" d="m14 8-4-4h4z" opacity=".3"/></g></svg> </span> </span>`}):m}};n([a({type:String,reflect:!0})],i.prototype,"identifier",void 0),n([a({type:String,reflect:!0})],i.prototype,"size",void 0),n([a({type:String})],i.prototype,"state",void 0),n([a({type:String})],i.prototype,"overlay",void 0),n([a({type:String})],i.prototype,"markup",void 0),n([a({type:String})],i.prototype,"raw",void 0),i=n([y("typo3-backend-icon")],i);export{i as IconElement};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import n from"@typo3/backend/utility.js";import{EventDispatcher as i}from"@typo3/backend/event/event-dispatcher.js";class r extends HTMLElement{constructor(){super(...arguments),this.args=[]}static get observedAttributes(){return["action","args","args-list"]}static async getDelegate(t){switch(t){case"TYPO3.ModuleMenu.App.refreshMenu":const{default:s}=await import("@typo3/backend/module-menu.js");return s.App.refreshMenu.bind(s.App);case"TYPO3.Backend.Topbar.refresh":const{default:e}=await import("@typo3/backend/viewport.js");return e.Topbar.refresh.bind(e.Topbar);case"TYPO3.WindowManager.localOpen":const{default:a}=await import("@typo3/backend/window-manager.js");return a.localOpen.bind(a);case"TYPO3.Backend.Storage.ModuleStateStorage.update":return(await import("@typo3/backend/storage/module-state-storage.js")).ModuleStateStorage.update;case"TYPO3.Backend.Storage.ModuleStateStorage.updateWithCurrentMount":return(await import("@typo3/backend/storage/module-state-storage.js")).ModuleStateStorage.updateWithCurrentMount;case"TYPO3.Backend.Event.EventDispatcher.dispatchCustomEvent":return i.dispatchCustomEvent;default:throw Error('Unknown action "'+t+'"')}}attributeChangedCallback(t,s,e){if(t==="action")this.action=e;else if(t==="args"){const a=e.replace(/"/g,'"'),o=JSON.parse(a);this.args=o instanceof Array?n.trimItems(o):[]}else if(t==="args-list"){const a=e.split(",");this.args=n.trimItems(a)}}connectedCallback(){if(!this.action)throw new Error("Missing mandatory action attribute");r.getDelegate(this.action).then(t=>t(...this.args))}}window.customElements.define("typo3-immediate-action",r);export{r as ImmediateActionElement};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{LitElement as u,html as d,nothing as m}from"lit";import{property as f,state as s,customElement as p}from"lit/decorators.js";var r=function(o,e,n,a){var i=arguments.length,t=i<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,n):a,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(o,e,n,a);else for(var h=o.length-1;h>=0;h--)(c=o[h])&&(t=(i<3?c(t):i>3?c(e,n,t):c(e,n))||t);return i>3&&t&&Object.defineProperty(e,n,t),t};let l=class extends u{constructor(){super(...arguments),this.value="",this.checked=!1,this.filename=""}connectedCallback(){super.connectedCallback(),this.checked=this.value!=="",this.filename=this.value!==""&&this.value!=="true"?this.value:""}createRenderRoot(){return this}render(){return d`<input type=hidden name=ldownload .value=${this.computeValue()}><div class=form-check><input type=checkbox class=form-check-input id=ldownload-checkbox .checked=${this.checked} @change=${this.handleCheckboxChange}> <label class=form-check-label for=ldownload-checkbox>${this.getAttribute("label-download")??"Force download"}</label></div>${this.checked?d`<div class=mt-2><label for=ldownload-filename class=form-label>${this.getAttribute("label-filename")??"Custom filename"}</label> <input id=ldownload-filename type=text class=form-control .value=${this.filename} @input=${this.handleFilenameInput}></div>`:m}`}computeValue(){return this.checked?this.filename!==""?this.filename:"true":""}handleCheckboxChange(e){this.checked=e.target.checked}handleFilenameInput(e){this.filename=e.target.value}};r([f({type:String})],l.prototype,"value",void 0),r([s()],l.prototype,"checked",void 0),r([s()],l.prototype,"filename",void 0),l=r([p("typo3-backend-link-browser-download")],l);export{l as LinkBrowserDownloadElement};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{property as u,customElement as m}from"lit/decorators.js";import{LitElement as d,html as g}from"lit";import{range as b}from"lit/directives/range.js";import{map as f}from"lit/directives/map.js";import{classMap as l}from"lit/directives/class-map.js";var c=function(i,t,n,a){var o=arguments.length,e=o<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,n):a,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(i,t,n,a);else for(var s=i.length-1;s>=0;s--)(r=i[s])&&(e=(o<3?r(e):o>3?r(t,n,e):r(t,n))||e);return o>3&&e&&Object.defineProperty(t,n,e),e};let p=class extends d{constructor(){super(...arguments),this.paging=null}createRenderRoot(){return this}render(){return g`<ul class=pagination><li class=${l({"page-item":!0,disabled:this.paging.currentPage===1})}><button type=button class=page-link data-action=previous ?disabled=${this.paging.currentPage===1}><typo3-backend-icon identifier=actions-view-paging-previous size=small></typo3-backend-icon></button></li>${f(b(1,this.paging.totalPages+1),t=>g`<li class=${l({"page-item":!0,active:this.paging.currentPage===t})}><button type=button class=page-link data-action=page data-page=${t}><span>${t}</span></button></li>`)}<li class=${l({"page-item":!0,disabled:this.paging.currentPage===this.paging.totalPages})}><button type=button class=page-link data-action=next ?disabled=${this.paging.currentPage===this.paging.totalPages}><typo3-backend-icon identifier=actions-view-paging-next size=small></typo3-backend-icon></button></li></ul>`}};c([u({type:Object})],p.prototype,"paging",void 0),p=c([m("typo3-backend-pagination")],p);export{p as PaginationElement};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{LitElement as l,css as d,nothing as h,html as b}from"lit";import{property as n,customElement as k}from"lit/decorators.js";import{styleMap as v}from"lit/directives/style-map.js";import m from"~labels/backend.layout";var p=function(s,r,t,i){var o=arguments.length,e=o<3?r:i===null?i=Object.getOwnPropertyDescriptor(r,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(s,r,t,i);else for(var g=s.length-1;g>=0;g--)(c=s[g])&&(e=(o<3?c(e):o>3?c(r,t,e):c(r,t))||e);return o>3&&e&&Object.defineProperty(r,t,e),e};let a=class extends l{constructor(){super(...arguments),this.stages=[],this.activeStage=0}static{this.styles=d`:host{--progress-tracker-margin:var(--typo3-spacing);--progress-tracker-stage:0;--progress-tracker-stages:0;--progress-tracker-gap:.25rem;--progress-tracker-bar-height:6px;--progress-tracker-bar-border-radius:3px;--progress-tracker-bar-bg:light-dark(var(--token-color-neutral-20),var(--token-color-neutral-80));--progress-tracker-bar-progress-bg:var(--typo3-state-primary-border-color);display:block;width:100%;margin-bottom:var(--progress-tracker-margin)}.tracker{position:relative;display:grid;gap:var(--progress-tracker-gap);grid-template-columns:auto min-content;grid-template-areas:"stage step" "bar bar"}.tracker-stage{grid-area:stage}.tracker-step{grid-area:step;white-space:nowrap}.tracker-bar{grid-area:bar;position:relative;width:100%;height:var(--progress-tracker-bar-height);border-radius:var(--progress-tracker-bar-border-radius);background-color:var(--progress-tracker-bar-bg)}.tracker-bar:after{content:"";height:100%;width:calc(100%/var(--progress-tracker-stages)*var(--progress-tracker-stage));display:block;border-radius:inherit;background-color:var(--progress-tracker-bar-progress-bg)}@media (prefers-reduced-motion:no-preference){.tracker-bar:after{transition:width .5s ease-in-out}}`}render(){if(this.stages.length<2)return h;this.activeStage=Math.min(Math.max(this.activeStage,this.stages.length>0?1:0),this.stages.length);const r=this.stages[this.activeStage-1],t=v({"--progress-tracker-stage":`${this.activeStage}`,"--progress-tracker-stages":`${this.stages.length}`});return b`<div class=tracker role=group aria-describedby=tracker-details style=${t}><div class=tracker-stage id=tracker-stage aria-live=polite>${r}</div><div class=tracker-step id=tracker-details>${m.get("progressTracker.steps",[this.activeStage,this.stages.length])||`Step ${this.activeStage} of ${this.stages.length}`}</div><div class=tracker-bar id=tracker-bar aria-hidden=true></div></div>`}};p([n({attribute:"stages",type:Array})],a.prototype,"stages",void 0),p([n({attribute:"active",type:Number,reflect:!0})],a.prototype,"activeStage",void 0),a=p([k("typo3-backend-progress-tracker")],a);export{a as ProgressTrackerElement};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{property as f}from"lit/decorators.js";import{LitElement as a,css as d,html as v}from"lit";import{KeyTypesEnum as l}from"@typo3/backend/enum/key-types.js";var c=function(n,t,r,o){var i=arguments.length,e=i<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,r):o,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(n,t,r,o);else for(var s=n.length-1;s>=0;s--)(p=n[s])&&(e=(i<3?p(e):i>3?p(t,r,e):p(t,r))||e);return i>3&&e&&Object.defineProperty(t,r,e),e};class u extends a{static{this.styles=[d`:host{cursor:pointer;appearance:button}`]}constructor(){super(),this.role="button",this.tabIndex=0,this.addEventListener("click",t=>{t.preventDefault(),this.buttonActivated(t)}),this.addEventListener("keydown",t=>{t.key===l.SPACE&&t.preventDefault(),t.key===l.ENTER&&(t.preventDefault(),this.buttonActivated(t))}),this.addEventListener("keyup",t=>{t.key===l.SPACE&&(t.preventDefault(),this.buttonActivated(t))})}render(){return v`<slot></slot>`}}c([f({type:String,reflect:!0})],u.prototype,"role",void 0),c([f({type:String,reflect:!0})],u.prototype,"tabIndex",void 0);export{u as PseudoButtonLitElement};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{property as d,state as h,customElement as b}from"lit/decorators.js";import{LitElement as y,html as s,nothing as f}from"lit";import v from"@typo3/core/ajax/ajax-request.js";import"@typo3/backend/element/spinner-element.js";import"@typo3/backend/element/icon-element.js";import"@typo3/backend/copy-to-clipboard.js";import{unsafeHTML as g}from"lit/directives/unsafe-html.js";import i from"~labels/backend.qrcode";var a=function(t,e,o,l){var c=arguments.length,r=c<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,o):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,l);else for(var m=t.length-1;m>=0;m--)(p=t[m])&&(r=(c<3?p(r):c>3?p(e,o,r):p(e,o))||r);return c>3&&r&&Object.defineProperty(e,o,r),r},u;(function(t){t[t.small=64]="small",t[t.medium=128]="medium",t[t.large=256]="large",t[t.mega=512]="mega"})(u||(u={}));let n=class extends y{constructor(){super(),this.content="",this.showDownload=!1,this.showUrl=!1,this.size=u.small,this.qrcodePreview=s`<typo3-backend-spinner size=large></typo3-backend-spinner>`,document.addEventListener("copy-to-clipboard-success",this.showCopySuccess.bind(this)),document.addEventListener("copy-to-clipboard-error",this.showCopyError.bind(this))}connectedCallback(){super.connectedCallback(),this.loadQrCode()}render(){return s`<div class=preview>${this.qrcodePreview}</div>${this.getUrlSection()} ${this.getControls()}`}createRenderRoot(){return this}getUrlSection(){if(!this.showUrl)return f;const e=i.get("qrcode.url"),o=i.get("qrcode.copyUrl");return s`<div class="form-group url-info-section"><label class=form-label>${e}</label><div class=input-group><input type=text class=form-control readonly .value=${this.content}><typo3-copy-to-clipboard text=${this.content} class="btn btn-default" silent><typo3-backend-icon identifier=actions-clipboard size=small></typo3-backend-icon>${o}</typo3-copy-to-clipboard></div></div>`}getControls(){if(!this.showDownload)return s`${f}`;const e=i.get("qrcode.format.png"),o=i.get("qrcode.format.svg"),l=i.get("qrcode.format"),c=i.get("qrcode.size"),r=i.get("qrcode.download");return s`<form name=qrcode-download method=POST action=${TYPO3.settings.ajaxUrls.qrcode_download}><div class=form-row><div class=form-group><input name=content type=hidden value=${this.content}> <label class=form-label>${l}</label> <select name=format class=form-select><option value=svg>${o}</option><option value=png>${e}</option></select></div><div class=form-group><label class=form-label>${c}</label> <select name=size class=form-select>${this.getSizeOptions()}</select></div><div class=form-group><button type=submit class="btn btn-primary">${r}</button></div></div></form>`}getSizeOptions(){return Object.entries(u).filter(([,e])=>typeof e=="number").map(([e,o])=>s`<option value=${e}>${o}x${o}</option>`)}async loadQrCode(){if(this.content===""){this.qrcodePreview=s`<typo3-backend-icon identifier=default-not-found size=small></typo3-backend-icon>`;return}await new v(TYPO3.settings.ajaxUrls.qrcode_generator).withQueryArguments({content:this.content,size:this.size}).get({cache:"no-cache"}).then(async e=>{this.qrcodePreview=s`${g(await e.resolve())}`})}showCopySuccess(){const e=this.querySelector(".url-info-section");e!==null&&(e.classList.add("copy-success"),setTimeout(()=>e.classList.remove("copy-success"),500))}showCopyError(){const e=this.querySelector(".url-info-section");e!==null&&(e.classList.add("copy-error"),setTimeout(()=>e.classList.remove("copy-error"),750))}};a([d({type:String,reflect:!0})],n.prototype,"content",void 0),a([d({type:Boolean,reflect:!0,attribute:"show-download"})],n.prototype,"showDownload",void 0),a([d({type:Boolean,reflect:!0,attribute:"show-url"})],n.prototype,"showUrl",void 0),a([d({type:String,reflect:!0})],n.prototype,"size",void 0),a([h()],n.prototype,"qrcodePreview",void 0),n=a([b("typo3-qrcode")],n);export{n as QrCodeElement};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{property as d,customElement as m}from"lit/decorators.js";import{PseudoButtonLitElement as u}from"@typo3/backend/element/pseudo-button.js";import c from"@typo3/backend/modal.js";import{html as f}from"lit";import{topLevelModuleImport as w}from"@typo3/backend/utility/top-level-module-import.js";import h from"~labels/core.mod_web_list";var l=function(r,t,o,i){var a=arguments.length,e=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,o,i);else for(var p=r.length-1;p>=0;p--)(s=r[p])&&(e=(a<3?s(e):a>3?s(t,o,e):s(t,o))||e);return a>3&&e&&Object.defineProperty(t,o,e),e};let n=class extends u{constructor(){super(...arguments),this.showUrl=!1,this.showDownload=!1}buttonActivated(){this.modalOpen()}async loadModuleFrameAgnostic(t){window.location!==window.parent.location?await w(t):await import(t)}async modalOpen(){await this.loadModuleFrameAgnostic("@typo3/backend/element/qrcode-element.js"),c.advanced({title:this.modalTitle||"QR Code",size:c.sizes.small,content:f`<div class=text-center><typo3-qrcode class=text-start content=${this.content} size=large ?show-download=${this.showDownload} ?show-url=${this.showUrl}></typo3-qrcode></div>`,buttons:[{text:h.get("button.close"),name:"close",trigger:function(t,o){o.hideModal()}}]})}};l([d({type:String,attribute:"modal-title"})],n.prototype,"modalTitle",void 0),l([d({type:String})],n.prototype,"content",void 0),l([d({type:Boolean,attribute:"show-url"})],n.prototype,"showUrl",void 0),l([d({type:Boolean,attribute:"show-download"})],n.prototype,"showDownload",void 0),n=l([m("typo3-qrcode-modal-button")],n);export{n as QrCodeModalButton};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{css as h,html as f}from"lit";import{property as b,state as m,customElement as g}from"lit/decorators.js";import{PseudoButtonLitElement as c}from"@typo3/backend/element/pseudo-button.js";import{ScaffoldState as r,ScaffoldSidebarToggleEvent as u}from"@typo3/backend/viewport/scaffold-state.js";import"@typo3/backend/element/icon-element.js";var l=function(d,e,a,s){var n=arguments.length,t=n<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,a):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(d,e,a,s);else for(var p=d.length-1;p>=0;p--)(o=d[p])&&(t=(n<3?o(t):n>3?o(e,a,t):o(e,a))||t);return n>3&&t&&Object.defineProperty(e,a,t),t};let i=class extends c{constructor(){super(...arguments),this.labelCollapse="Collapse sidebar",this.labelExpand="Expand sidebar",this.disabled=!1,this.expanded=!1,this.handleSidebarToggle=e=>{this.expanded=e.detail.expanded}}static{this.styles=[...c.styles,h`:host{display:inline-flex;align-items:center;justify-content:center;user-select:none}:host([disabled]){pointer-events:none;opacity:.5;cursor:default}`]}connectedCallback(){super.connectedCallback(),this.expanded=r.isLargeScreen()?r.isSidebarExpanded():r.isSidebarVisible(),this.updateLabels(),document.addEventListener(u.eventName,this.handleSidebarToggle)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(u.eventName,this.handleSidebarToggle)}updated(){this.updateLabels(),this.updateDisabledState()}render(){const e=this.expanded?"actions-menu-sidebar-collapsed":"actions-menu-sidebar-expanded",a=this.disabled?"overlay-readonly":null;return f`<typo3-backend-icon identifier=${e} size=small overlay=${a}></typo3-backend-icon>`}buttonActivated(){this.disabled||r.toggleSidebar()}updateLabels(){const e=this.expanded?this.labelCollapse:this.labelExpand;this.title=e,this.setAttribute("aria-label",e)}updateDisabledState(){this.disabled?(this.setAttribute("aria-disabled","true"),this.tabIndex=-1):(this.removeAttribute("aria-disabled"),this.tabIndex=0)}};l([b({type:String,attribute:"label-collapse"})],i.prototype,"labelCollapse",void 0),l([b({type:String,attribute:"label-expand"})],i.prototype,"labelExpand",void 0),l([b({type:Boolean,reflect:!0})],i.prototype,"disabled",void 0),l([m()],i.prototype,"expanded",void 0),i=l([g("typo3-backend-sidebar-toggle")],i);export{i as SidebarToggleElement};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{LitElement as a,html as m}from"lit";import{property as f,customElement as u}from"lit/decorators.js";import{Sizes as h}from"@typo3/backend/enum/icon-types.js";import{IconStyles as v}from"@typo3/backend/icons.js";var l=function(r,t,n,s){var o=arguments.length,e=o<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,n,s);else for(var c=r.length-1;c>=0;c--)(i=r[c])&&(e=(o<3?i(e):o>3?i(t,n,e):i(t,n))||e);return o>3&&e&&Object.defineProperty(t,n,e),e};let p=class extends a{constructor(){super(...arguments),this.size=h.default}static{this.styles=v.getStyles()}render(){return m`<span class="icon icon-size-${this.size} icon-state-default icon-spin"> <span class=icon-markup><svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 16 16"><g fill="currentColor"><path d="M8 15c-3.86 0-7-3.141-7-7s3.14-7 7-7 7 3.14 7 7-3.141 7-7 7M8 3C5.243 3 3 5.243 3 8s2.243 5 5 5 5-2.243 5-5-2.243-5-5-5" opacity=".3"/><path d="M14 9a1 1 0 0 1-1-1c0-2.757-2.243-5-5-5a1 1 0 0 1 0-2c3.859 0 7 3.14 7 7a1 1 0 0 1-1 1"/></g></svg> </span> </span>`}};l([f({type:String})],p.prototype,"size",void 0),p=l([u("typo3-backend-spinner")],p);export{p as SpinnerElement};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{property as p,customElement as d}from"lit/decorators.js";import{LitElement as h,html as f,nothing as c}from"lit";import{classMap as m}from"lit/directives/class-map.js";var l=function(n,t,o,a){var s=arguments.length,e=s<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,o):a,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(n,t,o,a);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(e=(s<3?r(e):s>3?r(t,o,e):r(t,o))||e);return s>3&&e&&Object.defineProperty(t,o,e),e};const g={online:"live",running:"loading"};let i=class extends h{constructor(){super(...arguments),this.state="default",this.live=!1,this.loading=!1,this.label=null}createRenderRoot(){return this}render(){const t=this.label!==null&&this.label!=="";return f`<span class=${m(this.getClasses())} title=${t?this.label:c} role=${t?"img":c} aria-label=${t?this.label:c} aria-hidden=${t?c:"true"}></span>`}getClasses(){const t=g[this.state];return{"status-indicator":!0,["status-indicator-"+this.state]:!0,"status-indicator-live":this.live||t==="live","status-indicator-loading":this.loading||t==="loading"}}};l([p({type:String})],i.prototype,"state",void 0),l([p({type:Boolean})],i.prototype,"live",void 0),l([p({type:Boolean})],i.prototype,"loading",void 0),l([p({type:String})],i.prototype,"label",void 0),i=l([d("typo3-backend-status-indicator")],i);export{i as StatusIndicatorElement};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{property as p,customElement as d}from"lit/decorators.js";import{LitElement as b,html as c}from"lit";import{Task as y}from"@lit/task";import"@typo3/backend/element/spinner-element.js";import"@typo3/backend/element/icon-element.js";var l=function(m,t,n,s){var a=arguments.length,e=a<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(m,t,n,s);else for(var r=m.length-1;r>=0;r--)(i=m[r])&&(e=(a<3?i(e):a>3?i(t,n,e):i(t,n))||e);return a>3&&e&&Object.defineProperty(t,n,e),e};const u={default:"default",small:"small",medium:"medium",large:"large"};let o=class extends b{constructor(){super(...arguments),this.size=u.default,this.keepAspectRatio=!1,this.thumbnailTask=new y(this,{task:async([t,n,s,a,e])=>{const i=new URL(t,window.origin);i.searchParams.set("size",n),i.searchParams.set("keepAspectRatio",s?"1":"0"),i.searchParams.set("bust",Date.now().toString(10));const r=new Image;return r.src=i.toString(),a>0&&(r.width=a),e>0&&!s&&(r.height=e),await new Promise((h,f)=>{r.onload=()=>h(),r.onerror=()=>f()}),c`${r}`},args:()=>[this.url,this.size,this.keepAspectRatio,this.width,this.height]})}createRenderRoot(){return this}render(){return this.thumbnailTask.render({pending:()=>c`<typo3-backend-spinner size=${this.size}></typo3-backend-spinner>`,complete:t=>c`${t}`,error:()=>c`<typo3-backend-icon identifier=default-not-found size=small></typo3-backend-icon>`})}};l([p({type:String,reflect:!0})],o.prototype,"url",void 0),l([p({type:String,reflect:!0})],o.prototype,"size",void 0),l([p({type:Boolean,reflect:!0})],o.prototype,"keepAspectRatio",void 0),l([p({type:Number,reflect:!0})],o.prototype,"width",void 0),l([p({type:Number,reflect:!0})],o.prototype,"height",void 0),o=l([d("typo3-backend-thumbnail")],o);export{o as ThumbnailElement,u as ThumbnailSize};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user