TYPO3 v15 dev-main snapshot ()

This commit is contained in:
2026-08-10 22:31:14 +02:00
commit ff4622ba97
138 changed files with 9045 additions and 0 deletions
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{Chart as t,ArcElement as i,LineElement as c,BarElement as d,PointElement as s,BarController as g,BubbleController as f,DoughnutController as u,LineController as h,PieController as C,PolarAreaController as m,RadarController as p,ScatterController as S,CategoryScale as b,LinearScale as v,LogarithmicScale as w,RadialLinearScale as y,TimeScale as E,TimeSeriesScale as L,Decimation as T,Filler as k,Legend as x,Title as z,Tooltip as D,SubTitle as R}from"chart.js";import B from"@typo3/core/event/regular-event.js";import{DashboardWidgetContentRenderedEvent as M}from"@typo3/dashboard/dashboard.js";class P{constructor(){this.selector=".dashboard-item",this.initialize()}initialize(){t.register(i,c,d,s,g,f,u,h,C,m,p,S,b,v,w,y,E,L,T,k,x,z,D,R),new B(M.eventName,(r,a)=>{r.preventDefault();const e=r.widget.eventdata;if(e===void 0||e.graphConfig===void 0)return;const l=a.querySelector("canvas");let o;if(l!==null&&(o=l.getContext("2d")),o===void 0)return;this.darkModeEnabled()?(e.graphConfig.options.color="#ccc",e.graphConfig.options.borderColor="#000",t.defaults.borderColor="rgba(255,255,255,.1)",t.defaults.color="#ccc"):(e.graphConfig.options.color="#666",e.graphConfig.options.borderColor="#fff",t.defaults.borderColor="rgba(0,0,0,.1)",t.defaults.color="#666");const n=t.getChart(o);if(n){n.data=e.graphConfig.data,n.options=e.graphConfig.options,n.update();return}new t(o,e.graphConfig)}).delegateTo(document,this.selector)}darkModeEnabled(){const r=document.querySelector(this.selector),e=window.getComputedStyle(r).colorScheme;return e==="light only"||e==="light"?!1:e==="dark only"||e==="dark"?!0:window.matchMedia("(prefers-color-scheme: dark)").matches}}var q=new P;export{q 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!
*/
import{LitElement as f,html as d,nothing as k}from"lit";import{property as m,state as c,customElement as y}from"lit/decorators.js";import{repeat as h}from"lit/directives/repeat.js";import g from"~labels/core.bookmarks";import u,{BookmarkStoreChangedEvent as b}from"@typo3/backend/bookmark/bookmark-store.js";import"@typo3/backend/bookmark/bookmark-manager.js";var l=function(r,t,e,s){var a=arguments.length,o=a<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,t,e,s);else for(var p=r.length-1;p>=0;p--)(i=r[p])&&(o=(a<3?i(o):a>3?i(t,e,o):i(t,e))||o);return a>3&&o&&Object.defineProperty(t,e,o),o};let n=class extends f{constructor(){super(...arguments),this.limit=0,this.groupId=null,this.groupedBookmarks=new Map,this.groups=[],this.handleStoreUpdate=()=>{this.syncFromStore()}}connectedCallback(){super.connectedCallback(),document.addEventListener(b,this.handleStoreUpdate),this.syncFromStore()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(b,this.handleStoreUpdate)}createRenderRoot(){return this}render(){return this.groupedBookmarks.size===0?d`<p class=dropdown-item-text>${g.get("description")}</p>`:d`<div class=widget-table-wrapper>${h(Array.from(this.groupedBookmarks.entries()),([t])=>t,([t,e])=>this.renderGroup(t,e,this.groupedBookmarks.size>1))}</div>`}async syncFromStore(){this.groupedBookmarks=await u.getGroupedBookmarks({groupId:this.groupId??void 0,limit:this.limit>0?this.limit:void 0,accessibleOnly:!0}),this.groups=await u.getGroups()}renderGroup(t,e,s){const o=this.groups.find(i=>i.id===t)?.label||g.get("notGrouped");return d`<table class="widget-table table table-striped table-hover">${s&&this.groupId===null?d`<thead><tr><th>${o}</th></tr></thead>`:k}<tbody>${h(e,i=>i.id,i=>this.renderBookmarkRow(i))}</tbody></table>`}renderBookmarkRow(t){return d`<tr><td><span class="bookmark-item-column bookmark-item-column-icon" aria-hidden=true> <typo3-backend-icon identifier=${t.iconIdentifier} overlay=${t.iconOverlayIdentifier} size=small></typo3-backend-icon> </span> <a href=${t.href} title=${t.title} @click=${e=>this.handleNavigate(e,t)}><span class="bookmark-item-column bookmark-item-column-title"> ${t.title} </span> </a></td></tr>`}handleNavigate(t,e){t.preventDefault(),u.navigate(e)}};l([m({type:Number})],n.prototype,"limit",void 0),l([m({attribute:"group",converter:{fromAttribute:r=>{if(r===null||r==="")return null;const t=Number(r);return Number.isNaN(t)?r:t},toAttribute:r=>r===null?null:String(r)}})],n.prototype,"groupId",void 0),l([c()],n.prototype,"groupedBookmarks",void 0),l([c()],n.prototype,"groups",void 0),n=l([y("typo3-dashboard-bookmarks-widget")],n);export{n as BookmarksWidgetElement};