TYPO3 v15 dev-main snapshot ()

This commit is contained in:
2026-08-10 22:31:38 +02:00
commit 4392dbe2ce
142 changed files with 11824 additions and 0 deletions
@@ -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{selector as a}from"@typo3/core/literals.js";import g from"@typo3/core/event/regular-event.js";var i;(function(t){t.single="1",t.recurring="2"})(i||(i={}));class u extends HTMLElement{async connectedCallback(){await s.ready(),this.fieldPrefix=this.getAttribute("fieldPrefix"),this.registerEventHandler()}registerEventHandler(){new g("change",()=>{this.toggleRunningType()}).delegateTo(this,a`input[name='${this.fieldPrefix}[runningType]']`),this.toggleRunningType()}toggleRunningType(){const l=this.querySelector(a`input[name='${this.fieldPrefix}[runningType]']:checked`).value;this.querySelectorAll(".t3js-timing-options-end, .t3js-timing-options-parallel, .t3js-timing-options-frequency").forEach(n=>{if(n.style.display=l===i.recurring?"block":"none",n.classList.contains("t3js-timing-options-frequency")){const e=n.querySelector("input[data-formengine-validation-rules]");let r,o;l===i.recurring?(r=e.getAttribute("data-formengine-validation-rules")==="[]",o='[{"type":"required"}]'):(r=e.getAttribute("data-formengine-validation-rules")!=="[]",o="[]"),r&&(e.setAttribute("data-formengine-validation-rules",o),TYPO3.FormEngine.Validation.initializeInputField(e.dataset.formengineInputName),TYPO3.FormEngine.Validation.validate())}})}}window.customElements.define("typo3-formengine-element-timing-options",u);
@@ -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,customElement as a}from"lit/decorators.js";import{PseudoButtonLitElement as d}from"@typo3/backend/element/pseudo-button.js";import c from"@typo3/backend/modal.js";import{SeverityEnum as m}from"@typo3/backend/enum/severity.js";import"@typo3/backend/new-record-wizard.js";var s=function(i,e,r,n){var p=arguments.length,t=p<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,e,r,n);else for(var l=i.length-1;l>=0;l--)(u=i[l])&&(t=(p<3?u(t):p>3?u(e,r,t):u(e,r))||t);return p>3&&t&&Object.defineProperty(e,r,t),t};let o=class extends d{buttonActivated(){this.url&&c.advanced({content:this.url,title:this.subject,severity:m.notice,size:c.sizes.large,type:c.types.ajax})}};s([f({type:String})],o.prototype,"url",void 0),s([f({type:String})],o.prototype,"subject",void 0),o=s([a("typo3-scheduler-new-task-wizard-button")],o);export{o as NewSchedulerTaskWizardButton};
@@ -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 r from"@typo3/backend/modal.js";import{html as d}from"lit";import m from"@typo3/core/ajax/ajax-request.js";import l from"@typo3/backend/notification.js";import n from"~labels/scheduler.messages";class p{constructor(){this.selector=".t3js-create-group",this.initialize()}initialize(){const o=document.querySelector(this.selector);o&&o.addEventListener("click",s=>{s.preventDefault();const e=d`<form name=scheduler-create-group @submit=${this.createGroup}><label class=form-label for=actionCreateGroup>Group name</label> <input class=form-control id=actionCreateGroup required name=action[createGroup] autofocus type=text><div class="form-text mt-3"><button type=button class="btn btn-link border-0 text-decoration-underline" @click=${this.editWholeRecord}>Edit</button> the whole record to add a custom color and description.</div></form>`;r.advanced({content:e,title:n.get("function.group.add"),size:r.sizes.small,buttons:[{trigger:()=>r.dismiss(),text:n.get("button.cancel"),btnClass:"btn-default",name:"cancel"},{trigger:()=>{r.currentModal.querySelector('form[name="scheduler-create-group"]').requestSubmit()},text:n.get("button.group.modalOk"),btnClass:"btn-primary",name:"ok"}]}).addEventListener("typo3-modal-shown",()=>{r.currentModal.querySelector('input[name="action[createGroup]"]').focus()})})}createGroup(o){o.preventDefault();const e=new FormData(o.target).get("action[createGroup]").toString(),t="NEW"+Math.random().toString(36).slice(2,7),c="&data[tx_scheduler_task_group]["+t+"][pid]=0&data[tx_scheduler_task_group]["+t+"][groupName]="+encodeURIComponent(e);return new m(TYPO3.settings.ajaxUrls.record_process).post(c,{headers:{"Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"}}).then(async a=>await a.resolve()).then(a=>(a.hasErrors&&l.error(n.get("msg.group.notification.error.title"),n.get("msg.group.notification.error.message")+' "'+e+'"!'),a.messages.forEach(i=>{l.info(i.title,i.message)}),a)).catch(()=>{l.error(n.get("msg.group.notification.error.title"),n.get("msg.group.notification.error.message")+' "'+e+'"!')}).finally(()=>{if(document.querySelector("#task_group")){const i=document.forms[0],u=i.querySelector('[name="tx_scheduler[select_latest_group]"]');u.value="1",i.submit()}else window.location.reload();r.dismiss()})}editWholeRecord(o){o.preventDefault();const s=r.currentModal.querySelector('input[name="action[createGroup]"]'),e=s?s.value.trim():"",t=new URL(top.TYPO3.settings.FormEngine.moduleUrl,window.location.origin);t.searchParams.set("edit[tx_scheduler_task_group][0]","new"),e&&t.searchParams.set("defVals[tx_scheduler_task_group][groupName]",e),t.searchParams.set("returnUrl",window.location.href),r.dismiss(),window.location.href=t.toString()}}var g=new p;export{g 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 n from"sortablejs";import l from"@typo3/backend/ajax-data-handler.js";class i{constructor(){this.container=".t3js-group-draggable-container",this.dragHandle=".t3js-group-draggable-handle",this.initialize()}initialize(){const r=document.querySelector(this.container);r&&(new n(r,{handle:this.dragHandle,onMove:e=>"taskGroupId"in e.related.dataset&&Number(e.related.dataset.taskGroupId)!==0,onSort:e=>{const o=e.target.children[e.newDraggableIndex-1];let d=0;o&&(d=+("-"+o.dataset.taskGroupId));const t=Number(e.item.dataset.taskGroupId),a="tx_scheduler_task_group",s={component:"contextmenu",action:"delete",table:a,uid:t};l.process("cmd["+a+"]["+t+"][move][action]=paste&cmd["+a+"]["+t+"][move][target]="+d+"&cmd["+a+"]["+t+"][move][update][colPos]=0&cmd["+a+"]["+t+"][move][update][sys_language_uid]=0",s)}}),document.querySelectorAll(this.dragHandle).forEach(e=>{e.disabled=!1}))}}var c=new i;export{c as default};
+13
View File
@@ -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 r from"@typo3/backend/sortable-table.js";import i from"@typo3/core/event/regular-event.js";import c from"@typo3/backend/icons.js";import l from"@typo3/backend/storage/persistent.js";import{MultiRecordSelectionSelectors as d}from"@typo3/backend/multi-record-selection.js";import u from"@typo3/core/document-service.js";class a{constructor(){u.ready().then(()=>{this.initializeEvents()})}static storeCollapseState(o,s){let t={};l.isset("moduleData.scheduler")&&(t=l.get("moduleData.scheduler"));const e={};e[o]=s?1:0,t={...t,...e},l.set("moduleData.scheduler",t)}initializeEvents(){document.querySelectorAll("[data-scheduler-table]").forEach(o=>{new r(o)}),new i("show.bs.collapse",this.toggleCollapseIcon.bind(this)).bindTo(document),new i("hide.bs.collapse",this.toggleCollapseIcon.bind(this)).bindTo(document),new i("multiRecordSelection:action:go",this.executeTasks.bind(this)).bindTo(document),new i("multiRecordSelection:action:go_cron",this.executeTasks.bind(this)).bindTo(document)}toggleCollapseIcon(o){const s=o.type==="hide.bs.collapse",t=document.querySelector('.t3js-toggle-table[data-bs-target="#'+o.target.id+'"] .t3js-icon');t!==null&&c.getIcon(s?"actions-view-list-expand":"actions-view-list-collapse",c.sizes.small).then(e=>{t.replaceWith(document.createRange().createContextualFragment(e))}),a.storeCollapseState(o.target.dataset.table,s)}executeTasks(o){const s=document.querySelector('[data-multi-record-selection-form="'+o.detail.identifier+'"]');if(s===null)return;const t=[];if(o.detail.checkboxes.forEach(e=>{const n=e.closest(d.elementSelector);n!==null&&n.dataset.taskId&&t.push(n.dataset.taskId)}),t.length){if(o.type==="multiRecordSelection:action:go_cron"){const e=document.createElement("input");e.setAttribute("type","hidden"),e.setAttribute("name","action[scheduleCron]"),e.setAttribute("value",t.join(",")),s.append(e)}else{const e=document.createElement("input");e.setAttribute("type","hidden"),e.setAttribute("name","action[execute]"),e.setAttribute("value",t.join(",")),s.append(e)}s.submit()}}}var m=new a;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 s,customElement as m}from"lit/decorators.js";import{PseudoButtonLitElement as y}from"@typo3/backend/element/pseudo-button.js";import l from"@typo3/backend/modal.js";import{SeverityEnum as d}from"@typo3/backend/enum/severity.js";var f=function(n,e,o,i){var p=arguments.length,t=p<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,o):i,u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(n,e,o,i);else for(var c=n.length-1;c>=0;c--)(u=n[c])&&(t=(p<3?u(t):p>3?u(e,o,t):u(e,o))||t);return p>3&&t&&Object.defineProperty(e,o,t),t};let r=class extends y{buttonActivated(){this.url&&l.advanced({content:this.url,title:this.subject,severity:d.notice,size:l.sizes.large,type:l.types.ajax})}};f([s({type:String})],r.prototype,"url",void 0),f([s({type:String})],r.prototype,"subject",void 0),r=f([m("typo3-scheduler-setup-check-button")],r);export{r as SetupCheckButton};